observer
The observer is a passive entity in the game. He is not allowed to communicate with the network. All he is permitted to do
is receive messages, process them and update its structures and screen. The actions peformed are similar to those of the
opponent, with the difference that the observer reveals all pieces therefore avoiding those checks.
Thus upon receiving a command the actions taken are:
determine if there was an attack and it was a draw in which case it should clear the x1,y1 and x2,y2 squares
if not a draw then process the move by moving x1,y1 to x2,y2 and then clearing x1,y1
update its data structures (battlefield array)
draw the appropriate piece at the correct square on the board.
set the turn variable back to 0 to allow receiver of message to play
It should be noted that at this stage of the game, the player need not check if the move performed is legal or not, as this has already been performed
before the move command was sent by the player. Thus at this point, the receiver should only be concerned with updating the battlefield array
correctly.
Please email me if you have any questions.