February 2014
Beginner
1248 pages
62h 25m
English
As the TicTacToeServer receives each client connection, it creates an instance of inner-class Player (Fig. 28.11, lines 182–304) to process the client in a separate thread. These threads enable the clients to play the game independently. The first client to connect to the server is player X and the second is player O. Player X makes the first move. The server maintains the information about the board so it can determine if a player’s move is valid.
Read now
Unlock full access