src/chess/fen.h

changeset 218
1e9751f8eb0d
parent 157
07cbfc477b22
equal deleted inserted replaced
217:507490519676 218:1e9751f8eb0d
48 * 48 *
49 * @param str a buffer large enough to hold the FEN string 49 * @param str a buffer large enough to hold the FEN string
50 * @param gamestate the current game state 50 * @param gamestate the current game state
51 * @see #FEN_MAX_LENGTH 51 * @see #FEN_MAX_LENGTH
52 */ 52 */
53 void fen_compute(char *str, GameState *gamestate); 53 void fen_compute(char *str, const GameState *gamestate);
54
55 /**
56 * Constructs a game state from a FEN string.
57 *
58 * Note that this cannot reconstruct a move history by design.
59 *
60 * @param str the FEN string
61 * @param gamestate uninitialized target structure
62 * @return zero on success, non-zero when the FEN is invalid
63 */
64 int fen_parse(const char *str, GameState *gamestate);
54 65
55 #ifdef __cplusplus 66 #ifdef __cplusplus
56 } /* extern "C" */ 67 } /* extern "C" */
57 #endif 68 #endif
58 69

mercurial