move-do: save move in state, pos-print: print last move

This commit is contained in:
2024-06-28 11:44:38 +02:00
parent b8f0f6a120
commit bb13eae0b8
2 changed files with 5 additions and 1 deletions

View File

@@ -70,6 +70,7 @@ pos_t *move_do(pos_t *pos, const move_t move, state_t *state)
pos->en_passant = SQUARE_NONE;
pos->turn = them;
pos->captured = captured;
pos->move = move;
bug_on(COLOR(piece) != us);
@@ -237,6 +238,7 @@ pos_t *move_do_alt(pos_t *pos, const move_t move, state_t *state)
pos->en_passant = SQUARE_NONE;
pos->turn = them;
pos->captured = captured;
pos->move = move;
bug_on(COLOR(piece) != us);