Fix edge-case in movegen
This commit is contained in:
parent
1ca79fa2ca
commit
5112d298ed
|
|
@ -26,8 +26,6 @@ class Movegen {
|
||||||
|
|
||||||
Move Movegen::next_move() {
|
Move Movegen::next_move() {
|
||||||
while(square <= 0x77) {
|
while(square <= 0x77) {
|
||||||
if(square & 0x88) square += 8;
|
|
||||||
|
|
||||||
byte piece_type = Board::field[square] & 0x7;
|
byte piece_type = Board::field[square] & 0x7;
|
||||||
|
|
||||||
if(
|
if(
|
||||||
|
|
@ -49,6 +47,7 @@ Move Movegen::next_move() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
square++;
|
square++;
|
||||||
|
if(square & 0x88) square += 8;
|
||||||
direction = 0;
|
direction = 0;
|
||||||
target_square = square;
|
target_square = square;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue