Skip to content

Commit

Permalink
include sign optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
RainRat committed Feb 13, 2024
1 parent 822949b commit 2be17e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2865,7 +2865,7 @@ bool Position::is_immediate_game_end(Value& result, int ply) const {
int total_count = 1; // Start with the current piece

// Check in both directions
for (int sign = -1; sign <= 1; sign += 2) {
for (int sign : {-1, 1}) {
Bitboard shifted = shift(sign * d, square_bb(s));
while (shifted) {
if (shifted & b) {
Expand Down

0 comments on commit 2be17e0

Please sign in to comment.