Fix edge-case in movegen

This commit is contained in:
Quinten Kock 2020-07-16 21:19:44 +02:00
parent 1ca79fa2ca
commit 5112d298ed
1 changed files with 1 additions and 2 deletions

View File

@ -26,8 +26,6 @@ class Movegen {
Move Movegen::next_move() {
while(square <= 0x77) {
if(square & 0x88) square += 8;
byte piece_type = Board::field[square] & 0x7;
if(
@ -49,6 +47,7 @@ Move Movegen::next_move() {
}
}
square++;
if(square & 0x88) square += 8;
direction = 0;
target_square = square;
}