public void MinMaxTest() { AI_Accessor target = new AI_Accessor(); GameBoard_Accessor board = CreateTestBoard(); GameBoard testBoard = new GameBoard(); testBoard = board.CloneBoard(); target.numberOfMovesAhead = 2; List<GamePieceMove> aiMoves = target.GetAIMoves(testBoard); foreach(GamePieceMove move in aiMoves) testBoard.ApplyMove(move); string expected = "\nB_B_B___\n___w____\n______B_\n_w______\n__b___b_\n________\n________\n___W_W__"; string actual = testBoard.ToString(); Assert.AreEqual(expected,actual); }
public void SetGameDifficultyToNormalTest() { AI_Accessor target = new AI_Accessor(); Difficulty difficulty = Difficulty.Normal; target.SetGameDifficulty(difficulty); int expected = 4; int actual = target.numberOfMovesAhead; Assert.AreEqual(expected, actual); }
public void IsDepthReachedWhenItHasNotBeenTest() { AI_Accessor target = new AI_Accessor(); target.numberOfMovesAhead = 4; int depth = 2; bool expected = false; bool actual = target.IsDepthReached(depth); Assert.AreEqual(expected, actual); }