173174175176177178179180181182183
public void testMiniMax() { TicTacToe t3 = new TicTacToe(); t3.makeMove(0, 0); t3.makeMove(2, 2); t3.makeMove(2, 0); t3.makeMove(1, 1); Assert.assertEquals(1, t3.getMiniMaxValue(t3.getState())); } @Test public void testMiniMax2() {
180181182183184185186187188189190
} @Test public void testMiniMax2() { TicTacToe t3 = new TicTacToe(); t3.makeMove(0, 0); t3.makeMove(2, 2); t3.makeMove(2, 0); Assert.assertEquals(1, t3.getMiniMaxValue(t3.getState())); }
181182183184185186187188189190191
@Test public void testMiniMax2() { TicTacToe t3 = new TicTacToe(); t3.makeMove(0, 0); t3.makeMove(2, 2); t3.makeMove(2, 0); Assert.assertEquals(1, t3.getMiniMaxValue(t3.getState())); }
182183184185186187188189190191192
@Test public void testMiniMax2() { TicTacToe t3 = new TicTacToe(); t3.makeMove(0, 0); t3.makeMove(2, 2); t3.makeMove(2, 0); Assert.assertEquals(1, t3.getMiniMaxValue(t3.getState())); } @Test
190191192193194195196197198199200
} @Test public void testMiniMax3() { TicTacToe t3 = new TicTacToe(); t3.makeMove(0, 0); t3.makeMove(1, 1); Assert.assertEquals(0, t3.getMiniMaxValue(t3.getState())); }
191192193194195196197198199200201
@Test public void testMiniMax3() { TicTacToe t3 = new TicTacToe(); t3.makeMove(0, 0); t3.makeMove(1, 1); Assert.assertEquals(0, t3.getMiniMaxValue(t3.getState())); } @Test
199200201202203204205206207208209
} @Test public void testMiniMax7() { TicTacToe t3 = new TicTacToe(); t3.makeMove(0, 0); t3.makeMove(0, 1); Assert.assertEquals(1, t3.getMiniMaxValue(t3.getState())); }
200201202203204205206207208209210
@Test public void testMiniMax7() { TicTacToe t3 = new TicTacToe(); t3.makeMove(0, 0); t3.makeMove(0, 1); Assert.assertEquals(1, t3.getMiniMaxValue(t3.getState())); } @Test
215216217218219220221222223224225
} @Test public void testTerminalStateDetection() { TicTacToe t3 = new TicTacToe(); t3.makeMove(0, 0); t3.makeMove(0, 1); t3.makeMove(0, 2); t3.makeMove(1, 0); t3.makeMove(1, 1); t3.makeMove(1, 2);
216217218219220221222223224225226
@Test public void testTerminalStateDetection() { TicTacToe t3 = new TicTacToe(); t3.makeMove(0, 0); t3.makeMove(0, 1); t3.makeMove(0, 2); t3.makeMove(1, 0); t3.makeMove(1, 1); t3.makeMove(1, 2);