Ejemplo n.º 1
0
 public void Burn(Forest forest)
 {
     if (IsBurned() || _burnedThisRound)
     {
         return;
     }
     LifePoints--;
     _currentlyBurning = true;
     _burnedThisRound  = true;
     if (Status == 'o')
     {
         forest.BurnTrees += this.Burn;
         Status            = 'X';
         return;
     }
     if (LifePoints == 0)
     {
         Status = '.';
         return;
     }
     BurnTrees?.Invoke(forest);
 }