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'; |