Пример #1
0
        private void AddShip(Ship ship)
        {
            Log.Output($"Adding ship: {ship}");
            var coords = new Coordinates(-1, -1);

            while (true)
            {
                coords = _playerInput.GetCoordinates();
                if (ValidCoordinates(coords))
                {
                    var dir   = _playerInput.GetDirection();
                    var added = AddShip(ship, coords, dir);
                    if (added)
                    {
                        break;
                    }
                }
            }
        }
Пример #2
0
 public Coordinates Hit()
 {
     return(_userInput.GetCoordinates());
 }