src/chess/rules.h

changeset 49
02c509a44e98
parent 48
0cedda2544da
child 50
41017d0a72c5
equal deleted inserted replaced
48:0cedda2544da 49:02c509a44e98
88 uint8_t promotion; 88 uint8_t promotion;
89 uint8_t check; 89 uint8_t check;
90 uint8_t capture; 90 uint8_t capture;
91 struct movetimeval timestamp; 91 struct movetimeval timestamp;
92 struct movetimeval movetime; 92 struct movetimeval movetime;
93 char string[8];
93 } Move; 94 } Move;
94 95
95 typedef struct MoveList MoveList; 96 typedef struct MoveList MoveList;
96 97
97 struct MoveList { 98 struct MoveList {
138 139
139 /* secure versions - use, if index is not checked with isidx() */ 140 /* secure versions - use, if index is not checked with isidx() */
140 #define fileidx_s(c) (isfile(c)?fileidx(c):POS_UNSPECIFIED) 141 #define fileidx_s(c) (isfile(c)?fileidx(c):POS_UNSPECIFIED)
141 #define rowidx_s(c) (isrow(c)?rowidx(c):POS_UNSPECIFIED) 142 #define rowidx_s(c) (isrow(c)?rowidx(c):POS_UNSPECIFIED)
142 143
144 /**
145 * Cleans up a game state and frees the memory for the movement list.
146 * @param gamestate the game state to clean up
147 */
143 void gamestate_cleanup(GameState *gamestate); 148 void gamestate_cleanup(GameState *gamestate);
144 149
145 /** 150 /**
146 * Maps a character to a piece. 151 * Maps a character to a piece.
147 * 152 *

mercurial