doubly nested tic-tac-toe game written in Java