コード例 #1
0
        private void ApplyDamage(Troop troop, VectorTwo startingPosition)
        {
            PlayerSide opponent = troop.Player.Opponent();

            score.Increment(opponent);

            if (troop.Player == activePlayer && troop.MovePoints > 0)
            {
                movePointsLeft--;
            }

            troop.ApplyDamage();
            if (troop.Health <= 0)
            {
                DestroyTroop(troop, startingPosition);
            }
        }