GAMEEND Message


This message may be send by the Initiator as well as by the Follower to request termination of the game. This message may initially only be sent by the program that has to move first (so a GAMEEND may initially only be sent by a program if it is it's turn, so actually GAMEEND is sent instead of a MOVE message. If a program wants to terminate the game, but it is not it's turn, it has to wait until it is it's turn).
GAMEEND is sent by the other program (on receipt of the initial GAMEEND message) to acknowledge the termination request. It has no choice, the game will always be terminated.

A reason to end the game is for example because the thinking time from the GAMEREQ message is exceeded, or because the number of moves from the GAMEREQ message is exceeded. Or any other reason you can think of.

Layout

1 byte 1 byte 1 byte
header reason stop code

 

header message type, always 'E' (upper case)
reason '0' if the Draughts computer program wants to terminate the game without wanting or being able to give a reason for it (always allowed). Optionally the following codes may be used in the initial GAMEEND message (for informational purposes only): `1' (I give up), `2' (draw, for example the same position on board for the third time), '3' (I win)
stop code '0' if the current game is to be terminated, but the program is willing to play a next game; `1' if the program wants to stop entirely, and does not want to play a next game.

Example
0----0----1----1----2----2----3----3----4----4----5----5----6----6
0----5----0----5----0----5----0----5----0----5----0----5----0----5
E00

The program wants to terminate the current game, but is willing to play a next game.

 

Processing on receipt of a GAMEEND message

On receipt instead of a MOVE message:

On receipt as acknowledge on a self-sent GAMEEND message (reason is always '0'):

DamExchange Home