MOVE message


This message may be sent by either the Initiator or the Follower. The MOVE message passes a move to the opponent program.

Layout

1 byte 4 bytes 2 bytes 2 bytes 2 bytes variable length
header time from field to field number captured captured pieces
header message type, always 'M' (upper case)
time the time in seconds the program used to generate the move, specified in 4 position; if the number of seconds is less than 1000 use leading zeroes, possible values therefore are `0000' to `9999'; in this initial version of DamExchange, entry time is for informational purposes only; in future versions of the DamExchange protocol functionality will be added for synchronizing the game clocks of the two playing programs
from field the originating field of the move, specified in 2 positions; if from field is less than 10, use a leading zero '0', possible values therefore are `01' to `50'
to field the destination field of the move, specified in 2 positions; if to field is less than 10, use a leading zero '0', possible values therefore are `01' to `50'
number captured the number of captured pieces (pieces and kings), specified in positions; if number captured is less than 10, use a leading zero '0', possible values therefore are `00' to `20'; if the move is not a capture move this entry is specified as '00'
captured pieces the fields, each in 2 positions, of the captured pieces; the order in which the fields are specified is not important; if a field number is less than 10, use a leading zero '0', possible values therefore are `01' to `50' for each field; the number of bytes for this entry is exactly twice the number in number captured; if the move is not a capture move, this entry is empty (0 bytes long)

 

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
M0012061100
M001205250422122320

The program passes moves 6 - 11 respectivily 5 x 25 (pieces 23, 22, 12 and 20 captured). In both examples the program used 12 seconds to generate the move.

 

Processing on receipt of a MOVE message

DamExchange Home