Example #1
0
	public void testAlphaBetaMinValueCalculation() {
		// board x o x , o o x,- x -
		TicTacToe t = new TicTacToe();

		t.makeMove(0, 0); // x
		t.makeMove(0, 1); // o
		t.makeMove(0, 2); // x

		t.makeMove(1, 0); // o
		t.makeMove(1, 2); // x
		t.makeMove(1, 1); // o

		t.makeMove(2, 1); // x

		int minValue = t.minValue(t.getState(), new AlphaBeta(
				Integer.MIN_VALUE, Integer.MAX_VALUE));
		Assert.assertEquals(0, minValue);
	}