// '' <summary> // '' Completes the deployment phase of the game and // '' switches to the battle mode (Discovering state) // '' </summary> // '' <remarks> // '' This adds the players to the game before switching // '' state. // '' </remarks> public static void EndDeployment() { // deploy the players _theGame.AddDeployedPlayer(_human); _theGame.AddDeployedPlayer(_ai); GameController.SwitchState(GameState.Discovering); }
// '' <summary> // '' Checks the results of the attack and switches to // '' Ending the Game if the result was game over. // '' </summary> // '' <param name="result">the result of the last // '' attack</param> // '' <remarks>Gets the AI to attack if the result switched // '' to the AI player.</remarks> private static void CheckAttackResult(AttackResult result) { switch (result.Value) { case ResultOfAttack.Miss: if ((_theGame.Player == ComputerPlayer)) { GameController.AIAttack(); } break; case ResultOfAttack.GameOver: GameController.SwitchState(GameState.EndingGame); break; } }