there are 4 types of requests that server need to response:
-
"CliNewPoint@X%Y" from drawers: upon receiving this request, the server should publish the new drawing point immediately to all the guessers.
-
"CliNewWinner@USER_ID" from guessers: upon receiving this request, the server should publish the winner immediately to all the players.
-
"CliNewPlayer@USER_ID%USER_IP%USER_NAME" from players: upon receiving this request, the server should see if there is enough space for the new player, if there is not, reject the player.
-
"CliPlayerReady@USER_ID%(1 or 0)" from players: upon receiving this request, the server should mark this play to be ready to play, if all players are ready, then start the game.
there are 5 types of messages that server may send:
-
"ServerNewPoint@X%Y"
-
"ServerNewWinner@USER_ID"
-
"ServerNewPlayer@USER_ID%USER_IP%USER_NAME%POSITION" (deprecate)
-
"ServerNewPlayerList@USER_ID%USER_IP%USER_NAME%POSITION|USER_ID%USER_IP%USER_NAME%POSITION|USER_ID%USER_IP%USER_NAME%POSITION"
-
"ServerPlayerReady@USER_ID"
-
"ServerNewGame@DRAWER_ID%WORD"