Пример #1
0
        // '' <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;
            }
        }