Pseudo-code for Dodge Register module ************************************************************************************************ Module variable: Set WhichDodge to 0 InitializeDodgeRegister //Takes a priority number, returns True. Initialize the MyPriority variable with the passed in parameter. Post Event ES_Init to DodgeRegister queue (this service) End of InitializeMorseElements PostDodgeRegister Takes an event and posts to service End of PostBeamBreak RunDodgeRegister //Takes an event as input, returns a blank event Based on EventType variable choose one of the following blocks of code: EventType is DODGE_POST Set WhichDodge to EventParam End DODGE_POST block EventType is BUTTON_PRESSED If WhichDodge is equal to EventParam Set EventType to DODGE_SUCCESS Set EventParam to WhichDodge Post Event to Gameplay module Else Set EventType to DODGE_MISTAKE Set EventParam to WhichDodge Post Event to Gameplay module End BUTTON_PRESSED block Return ES_NO_EVENT End of RunDodgeRegister