for (int i = 0; i < 9; i++)
if (ae.getSource() == squares[i])
game.makeMove(i / 3, i % 3);
}
}
TicTacToeBoard board = (TicTacToeBoard) game.getState().get("board");
for (int i = 0; i < 9; i++) {
String val = board.getValue(i / 3, i % 3);
if (val == TicTacToeBoard.EMPTY)
val = "";
squares[i].setText(val);
}
GameState state = game.getState();