Add move type enum and move struct
Some checks failed
Python tests (make) / test (push) Failing after 10s
Some checks failed
Python tests (make) / test (push) Failing after 10s
This commit is contained in:
@@ -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();
|
||||
void print_board();
|
||||
int gen_pseudo_moves(const struct Board *b, Move *out, bool captures_only);
|
||||
Reference in New Issue
Block a user