public void PlayerSetup() { Console.WriteLine("Enter player name"); name = Console.ReadLine(); bool check = false; do { PlaceShip("battleship", 5); PlaceShip("carrier", 4); PlaceShip("submarine", 3); PlaceShip("destroyer", 2); gameboard.Readout(gameboard.playerGameBoard); Console.WriteLine("are the ships where you want them?"); string setup = Console.ReadLine(); if (setup == "yes" || setup == "y" || setup == "ok") { check = true; } else { gameboard = new Gameboard(); } }while (check == false); }
public Player() { gameboard = new Gameboard(); PlayerSetup(); fleet = new List <Ship>() { gameboard.battleship, gameboard.carrier, gameboard.submarine, gameboard.destroyer }; }
//constructor public Players() { opponentsBoard = new Gameboard(); gameboard = new Gameboard(); score = 0; destroyer = new Destroyer(); submarine = new Submarine(); battleship = new Battleship(); aircraftCarrier = new AircraftCarrier(); fleet = new List <Ships>() { destroyer, submarine, battleship, aircraftCarrier }; }
public Player() { gameboard = new Gameboard(); name = Console.ReadLine(); Battleship battleship = new Battleship(); Carrier carrier = new Carrier(); Submarine submarine = new Submarine(); Destroyer destroyer = new Destroyer(); allShips.Add(battleship); allShips.Add(carrier); allShips.Add(submarine); allShips.Add(destroyer); }
//constructor public Player() { attackingBoard = new Gameboard(); defendingBoard = new Gameboard(); playerName = SelectPlayerName(); }
static void Main(string[] args) { Gameboard gameboard = new Gameboard(); gameboard.DisplayGameboard(); }