コード例 #1
0
        /// <summary>
        /// Assigns ships to the game
        /// </summary>
        private void AssignShipsToGame()
        {
            var ships = new ShipsForGame <Type, int>();

            ships.Add(typeof(BattleShip), NO_OF_BATTLESHIPS);
            ships.Add(typeof(Destroyer), NO_OF_DESTROYERS);
            ShipsForGame = ships;
        }
コード例 #2
0
ファイル: GameBoard.cs プロジェクト: remy22/BattleshipsGame
 /// <summary>
 /// Assigns ships to the game
 /// </summary>
 private void AssignShipsToGame()
 {
     var ships = new ShipsForGame<Type, int>();
     ships.Add(typeof(BattleShip), NO_OF_BATTLESHIPS);
     ships.Add(typeof(Destroyer), NO_OF_DESTROYERS);
     ShipsForGame = ships;
 }