diff --git a/engine/include/bitboard.h b/engine/include/bitboard.h index c2ac730..35f7feb 100644 --- a/engine/include/bitboard.h +++ b/engine/include/bitboard.h @@ -38,6 +38,23 @@ enum Castling { CASTLE_BQ = 1 << 3 }; +enum MoveFlags { + MF_NONE = 0, + MF_CAPTURE = 1 << 0, + MF_PROMO = 1 << 1, + MF_ENPASSANT = 1 << 2, + MF_CASTLE = 1 << 3, + MF_DOUBLE_PUSH = 1 << 4, +}; + +struct Move { + uint16_t from; + uint16_t to; + uint8_t piece; + uint8_t promo; + uint8_t flags; +} + struct Board { uint64_t pieces[12]; // Each set of pieces get a bitboard for each player. uint64_t occ[3]; // Color occupancy bitboards. @@ -55,4 +72,5 @@ struct Board { void create_knight_attack_cache(); void create_pawn_attack_cache(); void create_king_attack_cache(); -void print_board(); \ No newline at end of file +void print_board(); +int gen_pseudo_moves(const struct Board *b, Move *out, bool captures_only); \ No newline at end of file