add a struct_group for move_do() irreversible changes

This commit is contained in:
2024-03-17 17:34:21 +01:00
parent 49302c7a60
commit 9c2e76442d
2 changed files with 26 additions and 12 deletions

View File

@@ -95,10 +95,14 @@ pos_t *pos_clear(pos_t *pos)
# endif
pos->node_count = 0;
pos->turn = WHITE;
pos->clock_50 = 0;
pos->plycount = 0;
pos->en_passant = SQUARE_NONE;
pos->castle = 0;
pos->clock_50 = 0;
pos->plycount = 0;
for (square_t sq = A1; sq <= H8; ++sq)
pos->board[sq] = EMPTY;
for (color_t color = WHITE; color <= BLACK; ++color) {
for (piece_type_t piece = 0; piece <= KING; ++piece)
@@ -107,12 +111,12 @@ pos_t *pos_clear(pos_t *pos)
pos->king[color] = SQUARE_NONE;
}
for (square_t sq = A1; sq <= H8; ++sq)
pos->board[sq] = EMPTY;
pos->moves.curmove = 0;
pos->moves.nmoves = 0;
pos->checkers = 0;
pos->pinners = 0;
pos->blockers = 0;
//pos->moves.curmove = 0;
pos->moves.nmoves = 0;
return pos;
}