Checks if the current mode matches the target mode.
The target mode.
True if the current mode matches the target mode, otherwise false.
Adds an action to be executed on the next prompt.
The target phase.
The mode to wait for.
The callback to execute.
Optional
expireFn: (() => void)Optional function to determine if the prompt has expired.
Runs the game to the summon phase.
Optional
species: Species[]Optional array of species to summon.
A promise that resolves when the summon phase is reached.
Sets the game mode.
The mode to set.
Starts a battle.
Optional
species: Species[]Optional array of species to start the battle with.
A promise that resolves when the battle is started.
Waits until the specified mode is set.
The mode to wait for.
A promise that resolves when the mode is set.
Class to manage the game state and transitions between phases.