diff options
| author | Franklin Wei <me@fwei.tk> | 2017-05-27 19:04:08 -0400 |
|---|---|---|
| committer | Franklin Wei <me@fwei.tk> | 2017-05-27 19:04:08 -0400 |
| commit | 2d5966fe16f255bf280db68aa46fd6b759d9ebe3 (patch) | |
| tree | 28f17d67689bce4ac04af8d710d704803a30faf5 /chess.h | |
| parent | df29f1dba7e10c1eaa683a2625cb2556de46d351 (diff) | |
| download | xenonchess-2d5966fe16f255bf280db68aa46fd6b759d9ebe3.zip xenonchess-2d5966fe16f255bf280db68aa46fd6b759d9ebe3.tar.gz xenonchess-2d5966fe16f255bf280db68aa46fd6b759d9ebe3.tar.bz2 xenonchess-2d5966fe16f255bf280db68aa46fd6b759d9ebe3.tar.xz | |
perft and FEN parsing
Diffstat (limited to 'chess.h')
| -rw-r--r-- | chess.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -46,7 +46,7 @@ struct chess_ctx { struct piece_t board[8][8]; /* [rank (y)],[file (x)] */ enum player to_move; bool king_moved[2]; - bool rook_moved[2][2]; /* [player][0=first file,1=eighth file] */ + bool rook_moved[2][2]; /* [player][0=first file (queenside),1=eighth file (kingside)] */ bool en_passant[2][8]; }; @@ -67,3 +67,5 @@ int best_move_negamax(const struct chess_ctx *ctx, int depth, int a, int b, int color, struct move_t *best); bool can_castle(const struct chess_ctx *ctx, int color, int style); +uint64_t perft(const struct chess_ctx *ctx, int depth); +struct chess_ctx ctx_from_fen(const char *fen); |