src/chess/rules.h

changeset 181
8bda076d0a16
parent 179
5ef724e21702
child 182
04c65336777f
equal deleted inserted replaced
180:0fed680c487c 181:8bda076d0a16
84 typedef BoardIndex File; 84 typedef BoardIndex File;
85 typedef uint8_t Piece; 85 typedef uint8_t Piece;
86 typedef uint8_t Color; 86 typedef uint8_t Color;
87 87
88 struct movetimeval { 88 struct movetimeval {
89 uint64_t tv_sec; 89 uint64_t sec;
90 int32_t tv_usec; /* important that this is signed b/c potential carry */ 90 int32_t usec; /* important that this is signed b/c potential carry */
91 }; 91 };
92 92
93 typedef struct { 93 typedef struct {
94 Piece piece; 94 Piece piece;
95 File fromfile; 95 File fromfile;
99 Piece promotion; 99 Piece promotion;
100 uint8_t check; /* must always be set if checkmate is set */ 100 uint8_t check; /* must always be set if checkmate is set */
101 uint8_t checkmate; 101 uint8_t checkmate;
102 uint8_t capture; 102 uint8_t capture;
103 uint8_t padding[7]; /* necessary for stable ABI across networks */ 103 uint8_t padding[7]; /* necessary for stable ABI across networks */
104 struct movetimeval timestamp; 104 struct movetimeval timestamp; /* TODO: remove this from the struct */
105 struct movetimeval movetime; 105 uint64_t movetime; /* the time for this move in microseconds */
106 char string[8]; 106 char string[8];
107 } Move; 107 } Move;
108 108
109 typedef struct { 109 typedef struct {
110 uint8_t servercolor; 110 uint8_t servercolor;

mercurial