Tic-Tac-Toe in java