eGame Event Sheet
There isn't much here. Since there isn't much interaction in Tic-Tac-Toe, the few user events just call functions on the eCommunications event sheet to send messages to the other player. TileHiliting and board-tile-presses are sent.
Communications are broken up into outgoing Commands, and incoming Messages.
CmdTileHilite() - this builds up a hilite message of the X, Y, and hilite value for a tile.
If the message isn't the same as the last one, we send the TileHilite message, store the message to compare against next time, and call HiliteTile() to hilite the tile on our side.
CmdMakeMove() - we send the message to the other player of the X, Y, and move(X or O), call MarkTheMove() to mark the tile on our side, and then check for a winner. If the game isn't flaged as over, call SwitchPlayer() to switch who's turn it is.
CmdRestart() - this just resets everything to start the game over. We flip who starts first, and send a Restart message to the other player with who moves first.
These match what we just covered, only when we are the "other" player.
"TileHilite" message - decode the parameters, and call HiliteTile().
"MakeMove" - decode the parameters and MarkTheMove() and check for game over. Switch players as appropriate.
"Restart" - set the first move ID and go to the Game layout.