public override GameState PerformStateChange() { GameState State = this; switch (RequestedState) { case GameStateID.Playing: bool selectionListFilled = true; for (int i = 0; i < noPlayers; ++i) { selectionListFilled &= SelectionList[i].Count > 0; } if (selectionListFilled) { State = new PlayingState(Host, Host.Config.IO.Keyboard.Left, Host.Config.IO.Keyboard.Right, SelectionList); } break; } RequestedState = GameStateID.Invalid; return(State); }
public override GameState PerformStateChange() { GameState State = this; switch (RequestedState) { case GameStateID.Playing: bool selectionListFilled = true; for (int i = 0; i < noPlayers; ++i) selectionListFilled &= SelectionList[i].Count > 0; if (selectionListFilled) { State = new PlayingState(Host, Host.Config.IO.Keyboard.Left, Host.Config.IO.Keyboard.Right, SelectionList); } break; } RequestedState = GameStateID.Invalid; return State; }