Skip to content

Commit

Permalink
wallOrMove bug fix (#763)
Browse files Browse the repository at this point in the history
  • Loading branch information
RainRat authored Apr 17, 2024
1 parent f3c982b commit c0a94e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ void Position::do_move(Move m, StateInfo& newSt, bool givesCheck) {
Piece captured = piece_on(type_of(m) == EN_PASSANT ? capture_square(to) : to);
if (to == from)
{
assert((type_of(m) == PROMOTION && sittuyin_promotion()) || (is_pass(m) && pass(us)));
assert((type_of(m) == PROMOTION && sittuyin_promotion()) || (is_pass(m) && (pass(us) || var->wallOrMove )));
captured = NO_PIECE;
}
st->capturedpromoted = is_promoted(to);
Expand Down Expand Up @@ -2128,7 +2128,7 @@ void Position::undo_move(Move m) {

assert(type_of(m) == DROP || empty(from) || type_of(m) == CASTLING || is_gating(m)
|| (type_of(m) == PROMOTION && sittuyin_promotion())
|| (is_pass(m) && pass(us)));
|| (is_pass(m) && (pass(us) || var->wallOrMove)));
assert(type_of(st->capturedPiece) != KING);

// Reset wall squares
Expand Down

0 comments on commit c0a94e4

Please sign in to comment.