Пример #1
0
        public static Player[,] GetTestPositionOne()
        {
            var state = new InitialBoardState();

              state[0, 5] = Player.Human;
              state[3, 5] = Player.AI;
              state[3, 4] = Player.Human;
              state[3, 3] = Player.AI;
              state[3, 2] = Player.AI;

              return state;
        }
Пример #2
0
        public static Player[,] GetTestPositionTwo()
        {
            var state = new InitialBoardState();

              state[0, 5] = Player.AI;
              state[0, 4] = Player.Human;
              state[1, 5] = Player.AI;
              state[1, 4] = Player.Human;
              state[2, 4] = Player.AI;
              state[2, 5] = Player.Human;
              state[3, 4] = Player.AI;
              state[3, 5] = Player.Human;
              state[4, 5] = Player.AI;
              state[4, 4] = Player.Human;
              state[5, 5] = Player.AI;
              state[5, 4] = Player.Human;
              state[6, 4] = Player.AI;
              state[6, 5] = Player.Human;

              return state;
        }
Пример #3
0
        private void BlockTestVertical(int column)
        {
            var state = new InitialBoardState();

              for (int i = 3; i < 6; i++)
              {
            state[column, i] = Player.Human;
              }

              var board = new GameBoard(state);

              var game = new Game(board, Player.Human)
              {
            MoveGenerator = new LeftToRightMoveOrdering(),
            SearchStrategy = new AlphaBeta(),
            Input = new MockGameInput()
              };

              game.Start();

              Assert.IsTrue(game.Board[column, 2] == Player.AI, "AI had er voor moeten kiezen om de speler te blokkeren.");
        }