Java code for Tic-Tac-Toe game