示例#1
0
    internal AttackResult ImpAIShoot(int row, int col)
    {
        _shots += 1;
        AttackResult result = default(AttackResult);

        result = EnemyGrid.ImpAIHitTile(row, col);

        switch (result.Value)
        {
        case ResultOfAttack.Destroyed:
        case ResultOfAttack.Hit:
            _hits += 1;
            break;

        case ResultOfAttack.Miss:
            _misses += 1;
            break;
        }

        return(result);
    }