Exemple #1
0
        public CoordinateStatus Hit(int row, int col)
        {
            var coordinate = BattleGround.Locate(row, col);

            coordinate.Hit();
            if (OnOver != null && IsOver())
            {
                OnOver();
            }
            return(coordinate.Status);
        }
Exemple #2
0
 public void PlaceShip(Ship ship, int startRow, int startCol, Orientation orientation)
 {
     BattleGround.PlaceShip(ship, startRow, startCol, orientation);
     Ships.Add(ship);
 }
Exemple #3
0
 public void Setup()
 {
     BattleGround = new BattleGround(BattleGroundSize);
     Ships        = new Collection <Ship>();
 }