src/chess/rules.h

changeset 147
7e3f2d462bb6
parent 133
c58ae152733e
equal deleted inserted replaced
146:942a0cef9ff5 147:7e3f2d462bb6
332 * @param mstr the input string to parse 332 * @param mstr the input string to parse
333 * @param move a pointer to object where the move data shall be stored 333 * @param move a pointer to object where the move data shall be stored
334 * @param color the color of the player to evaluate the move for 334 * @param color the color of the player to evaluate the move for
335 * @return status code (see macros in this file for the list of codes) 335 * @return status code (see macros in this file for the list of codes)
336 */ 336 */
337 int eval_move(GameState *gamestate, char *mstr, Move *move, uint8_t color); 337 int eval_move(GameState *gamestate, const char *mstr,
338 Move *move, uint8_t color);
338 339
339 /** 340 /**
340 * Syntactically checks a move without verifying that a piece exists that is 341 * Syntactically checks a move without verifying that a piece exists that is
341 * allowed to move that way. 342 * allowed to move that way.
342 * 343 *
343 * @param mstr the input string to parse 344 * @param mstr the input string to parse
344 * @param color the color of the player to evaluate the move for 345 * @param color the color of the player to evaluate the move for
345 * @return status code (see macros in this file for the list of codes) 346 * @return status code (see macros in this file for the list of codes)
346 */ 347 */
347 int check_move(char *mstr, uint8_t color); 348 int check_move(const char *mstr, uint8_t color);
348 349
349 /** 350 /**
350 * Validates move by applying chess rules. 351 * Validates move by applying chess rules.
351 * @param gamestate the current game state 352 * @param gamestate the current game state
352 * @param move the move to validate 353 * @param move the move to validate

mercurial