Exemplo n.º 1
0
        public void ClearBoardTest2()
        {
            var colors = new List <Colors>();

            for (int i = 0; i < GameConstants.WellCount; i++)
            {
                if (i < 10)
                {
                    colors.Add(Colors.BLUE);
                }
                else if (i >= 30 && i < 40)
                {
                    colors.Add(Colors.BLUE);
                }
                else
                {
                    colors.Add(Colors.Empty);
                }
            }
            var fList     = ListModule.OfSeq(colors);
            var gameState = GameStateFactory.GetGameState_GivenBoard(new System.Random(), fList);
            var engine    = new Engine(0, gameState);

            engine.tick();
            var gs        = engine.ViewGameState();
            var clearRows = Board.getClearRows(gs.Board);

            Assert.IsTrue(!clearRows.Any());
        }