src/game.c

changeset 17
2aed5418e142
parent 16
a298c6637c30
child 18
6008840b859e
equal deleted inserted replaced
16:a298c6637c30 17:2aed5418e142
230 */ 230 */
231 static int eval_move(Board board, uint8_t mycolor, char *mstr, Move *move) { 231 static int eval_move(Board board, uint8_t mycolor, char *mstr, Move *move) {
232 memset(move, 0, sizeof(Move)); 232 memset(move, 0, sizeof(Move));
233 move->fromfile = POS_UNSPECIFIED; 233 move->fromfile = POS_UNSPECIFIED;
234 move->fromrow = POS_UNSPECIFIED; 234 move->fromrow = POS_UNSPECIFIED;
235 235 // TODO: promotion
236 size_t len = strlen(mstr); 236 size_t len = strlen(mstr);
237 237
238 /* evaluate check/checkmate flags */ 238 /* evaluate check/checkmate flags */
239 if (mstr[len-1] == '+') { 239 if (mstr[len-1] == '+') {
240 len--; mstr[len] = '\0'; 240 len--; mstr[len] = '\0';

mercurial