Beispiel #1
0
    /// <summary>
    /// Gets the AI to attack.
    /// </summary>
    /// <remarks>
    /// Checks the attack result once the attack is complete.
    /// </remarks>
    private static void AIAttack()
    {
        AttackResult result = default(AttackResult);

        result = _theGame.Player.Attack();
        if (result.Value == ResultOfAttack.Miss)
        {
            _theGame.setPlayerIndex(0);
        }
        else
        {
            _theGame.setPlayerIndex(1);
        }
        CheckAttackResult(result);
    }