move.c: Code cleanup, add promotion in move_do

This commit is contained in:
2023-07-07 12:11:17 +02:00
parent 183e9ef2be
commit 12f972e152
2 changed files with 62 additions and 59 deletions

View File

@@ -45,7 +45,6 @@ typedef struct move_s {
piece_t promotion; /* promoted piece */
move_flags_t flags;
struct list_head list; /* next move */
//struct pos_s *newpos; /* resulting position */
} move_t;
pool_t *moves_pool_init();
@@ -56,10 +55,10 @@ void moves_print(pos_t *move, move_flags_t flags);
void move_del(struct list_head *ptr);
int moves_del(pos_t *pos);
int pseudo_moves_castle(pos_t *pos, bool color, bool doit, bool doking);
int pseudo_moves_gen(pos_t *pos, piece_list_t *piece, bool doit, bool doking);
int pseudo_moves_castle(pos_t *pos, bool color, bool doit, bool do_king);
int pseudo_moves_gen(pos_t *pos, piece_list_t *piece, bool doit, bool do_king);
int pseudo_moves_pawn(pos_t *pos, piece_list_t *piece, bool doit);
int moves_gen(pos_t *pos, bool color, bool doit, bool doking);
int moves_gen(pos_t *pos, bool color, bool doit, bool do_king);
int moves_gen_king_moves(pos_t *pos, bool color, bool doit);
void moves_gen_all(pos_t *pos);