}
@Test
public void testCalculateUtilityOfABoard() {
// game 1
TicTacToe t3 = new TicTacToe();
t3.makeMove(t3.getState(), 0, 0);
Assert.assertEquals(0, t3.getUtility(t3.getState()));
t3.makeMove(t3.getState(), 2, 2);
Assert.assertEquals(0, t3.getUtility(t3.getState()));
t3.makeMove(t3.getState(), 2, 0);
Assert.assertEquals(0, t3.getUtility(t3.getState()));
t3.makeMove(t3.getState(), 1, 0);
Assert.assertEquals(0, t3.getUtility(t3.getState()));
t3.makeMove(t3.getState(), 0, 2);
Assert.assertEquals(0, t3.getUtility(t3.getState()));
t3.makeMove(t3.getState(), 0, 1);
Assert.assertEquals(0, t3.getUtility(t3.getState()));
t3.makeMove(t3.getState(), 1, 1);
Assert.assertEquals(1, t3.computeUtility((t3.getState())));
// game 2
TicTacToe t4 = new TicTacToe();
t4.makeMove(t4.getState(), 0, 0);
Assert.assertEquals(0, t4.getUtility(t4.getState()));
t4.makeMove(t4.getState(), 0, 1);
Assert.assertEquals(0, t4.getUtility(t4.getState()));
t4.makeMove(t4.getState(), 0, 2);
Assert.assertEquals(0, t4.getUtility(t4.getState()));
t4.makeMove(t4.getState(), 1, 0);
Assert.assertEquals(0, t4.getUtility(t4.getState()));
t4.makeMove(t4.getState(), 1, 1);
Assert.assertEquals(0, t4.getUtility(t4.getState()));
t4.makeMove(t4.getState(), 1, 2);
Assert.assertEquals(0, t4.getUtility(t4.getState()));
t4.makeMove(t4.getState(), 2, 0);
Assert.assertEquals(1, t4.computeUtility(t4.getState()));
}