Exemplo n.º 1
0
        public void TestMoveCanBeMadeToValidColumn()
        {
            var game  = new Game();
            var board = new BoardAPI(10, 8);

            var actualResult = board.IsMoveAllowed(game.Cells, 1) && board.IsMoveAllowed(game.Cells, Game.NUMBER_OF_COLUMNS - 1);

            Assert.IsTrue(actualResult);
        }
Exemplo n.º 2
0
        public void TestMoveCannotBeMadeToInvalidNegativeColumn()
        {
            var game  = new Game();
            var board = new BoardAPI(10, 8);

            var actualResult = board.IsMoveAllowed(game.Cells, -1);

            Assert.IsFalse(actualResult);
        }
Exemplo n.º 3
0
        public void TestMoveCannotBeMadeToInvalidPostiveColumn()
        {
            var game  = new Game();
            var board = new BoardAPI(Game.NUMBER_OF_COLUMNS, Game.NUMBER_OF_ROWS);

            //valid is 0...n-1
            var actualResult = board.IsMoveAllowed(game.Cells, Game.NUMBER_OF_COLUMNS);

            Assert.IsFalse(actualResult);
        }