static void Main(string[] args) { var grid = new Grid(10, 10); var fleet = new Fleet(new List<Ship> { new Ship(ShipType.Battleship, ShipOrientation.Horizontal, grid.Width, grid.Height), new Ship(ShipType.Destroyer, ShipOrientation.Vertical, grid.Width, grid.Height), new Ship(ShipType.Destroyer, ShipOrientation.Horizontal, grid.Width, grid.Height) }); grid.PlaceShipsOnGrid(fleet); }
public Player(string name) { Name = name; G = new Grid(8, 8); //TODO: Ships cannot be larger than grid Ships = new List<Ship>(); Ship aircraftcarrier = new Ship("Aircraft Carrier", 5); Ship battleship = new Ship("Battleship", 4); Ship destroyer = new Ship("Destroyer", 3); Ship submarine = new Ship("Submarine", 3); Ship patrolboat = new Ship("Patrol Boat", 2); Ships.Add(aircraftcarrier); Ships.Add(battleship); Ships.Add(destroyer); Ships.Add(submarine); Ships.Add(patrolboat); }