Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into main
  • Loading branch information
ArjunSahlot committed Mar 13, 2021
2 parents 9889c4b + 0ff45b0 commit 1836676
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bitboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ namespace Bitboard {
}
// Forward
y = i/8;
const char speed = (y == (pos.turn ? 1 : 6)) ? 2 : 1; // If white check rank 6 else rank 1 if on that rank 2 else 1
const char speed = (y == (pos.turn ? 1 : 6)) ? 2 : 1; // Set speed to 2 if pawn's first move.
if (pos.turn) {
for (auto cy = y + 1; cy < y + speed + 1; cy++) {
const char loc = cy*8 + x;
Expand Down

0 comments on commit 1836676

Please sign in to comment.