Esempio n. 1
0
 private void UndoShot()
 {
     if (_shots.Count != 0)
     {
         ShotEvent shot = _shots.Pop().UndoShot();
         if (shot.WasHit)
         {
             Opponent.UndoHit(shot.CoordX, shot.CoordY, shot.ShipNumb);
         }
     }
     else
     {
         Console.WriteLine("You can't undo the game.");
     }
 }