Tic Tac Toe Logic Java