event checkers pseudocode CheckStartButton(void) check state of button pin compare to previous state debounce (check time of first change) post event if change in state indicates a button press CheckGameTime(void) get time from SM1 module check whether current time is past game time interval if yes, post event to all SMs update servo position checkAnyBottom(void) check state of bottom pin compare to previous state post event to all SMs if change in state (to low) CheckInitState(void) if SM1 has finished reseting and SM2 has finished reseting and SM3 has finished reseting (all in ResetGame state) post event ResetComplete to all SMs //then SMs move to init state - prevents game from restarting before all SMs have finished resetting CheckShot(void) check state of shot pin if high and different from last post event to corresponding state machine CheckTop(void) check state of top pin if low and different from last post event to corresponding state machine CheckThreshold(void) check state of middle tape sensor pin if high and different from last post event to corresponding state machine CheckWave(void) check state of wave tape sensor pin if high and different from last post event to corresponding state machine