Once a level is loaded, the user is playing the game and inputting a sequence. While the main component that's responsible for processing these inputs is the Command Palette component, game manager should retrieve the sequence related information from the levelInformation object and pass it to the UI Layer components, namely the Command Palette and Sequencer components. Game manager should own the memory store of the user input sequence and modify it when needed (i.e. Command Palette sends a message to add a command).
Later, when the simulation begins, the game manager should be responsible for tracking which steps are simulated and share this information with the UI layer components.
Therefore, the game manager should:
Retrieve the sequence related information from the levelInformation object and remember it.
Have/Maintain the state of the user input sequence(s). Should provide the necessary callbacks to modify this state.
Have/Maintain the state of which step is next (could be 2 states, one to indicate which sequence/subsequence is being iterated and one to indicate which index/step is next).
Should reset these states upon restarting the level (should hold onto the user input sequence(s) in almost all cases, maybe not when the level is restarted after a success).
Once a level is loaded, the user is playing the game and inputting a sequence. While the main component that's responsible for processing these inputs is the
Command Palette
component, game manager should retrieve the sequence related information from thelevelInformation
object and pass it to the UI Layer components, namely theCommand Palette
andSequencer
components. Game manager should own the memory store of the user input sequence and modify it when needed (i.e.Command Palette
sends a message to add a command).Later, when the simulation begins, the game manager should be responsible for tracking which steps are simulated and share this information with the UI layer components.
Therefore, the game manager should:
levelInformation
object and remember it.