示例#1
0
        private void StartNewGame()
        {
            this.player.CurrentMoves = 0;
            var gameBoardArray = GameBoardGenerator.GenerateGameBoard(Config.GameBoardHeight, Config.GameBoardWidth, Config.MaxColorCount);

            this.GameBoard    = new GameBoard(gameBoardArray);
            this.EntityPopper = new EntityPopper(this.GameBoard.Entities);
        }
示例#2
0
        public void Test_GameBoardGenerator_ShouldFillAllFieldsWithBaloons()
        {
            var gameBoard = GameBoardGenerator.GenerateGameBoard(20, 20, 4);

            for (int row = 0; row < gameBoard.GetLength(0); row++)
            {
                for (int col = 0; col < gameBoard.GetLength(1); col++)
                {
                    Assert.IsInstanceOfType(gameBoard[row, col], typeof(Baloon));
                }
            }
        }
示例#3
0
 public void Test_GameBoardGeneratorWithIvalidParameters_ShouldThrowAnExeption()
 {
     GameBoardGenerator.GenerateGameBoard(-20, 20, 4);
 }