Example #1
0
        public static List <Player> LoadBattleConsoles(int optionSelected)
        {
            List <Ship> playerOneShips = new List <Ship> {
                new Ship("Destroyer", 2), new Ship("Submarine", 3), new Ship("Battleship", 4), new Ship("Aircraft Carrier", 5)
            };

            List <Ship> playerTwoShips = new List <Ship> {
                new Ship("Destroyer", 2), new Ship("Submarine", 3), new Ship("Battleship", 4), new Ship("Aircraft Carrier", 5)
            };

            BattleConsole        battleConsoleOne   = new BattleConsole(playerOneShips);
            BattleConsole        battleConsoleTwo   = new BattleConsole(playerTwoShips);
            List <BattleConsole> battleConsolesList = new List <BattleConsole> {
                battleConsoleOne, battleConsoleTwo
            };

            List <Player> playersList = LoadPlayers(optionSelected, battleConsolesList);

            return(playersList);
        }
Example #2
0
 public Human(string name, BattleConsole battleConsole)
 {
     this.name          = name;
     this.battleConsole = battleConsole;
 }
Example #3
0
 public Computer(string name, BattleConsole battleConsole)
 {
     this.name          = name;
     this.battleConsole = battleConsole;
 }