N-dimensional TicTacToe in Java