Exemplo n.º 1
0
 public HitResults Fire(int row, int column)
 {
     foreach (Ship ship in m_ships)
     {
         HitResults result = ship.Fire(row, column);
         if (result != HitResults.Missed)
         {
             if (result == HitResults.Sunk)
                 m_lastSunkenShip = ship;
             return result;
         }
     }
     return HitResults.Missed;
 }
Exemplo n.º 2
0
 public void AddShip(Ship ship)
 {
     m_ships.Add(ship);
 }