From 5112d298eda084aaa73e1c13ebbb16adaee61304 Mon Sep 17 00:00:00 2001 From: Quinten Kock Date: Thu, 16 Jul 2020 21:19:44 +0200 Subject: [PATCH] Fix edge-case in movegen --- Movegen.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Movegen.h b/Movegen.h index 69026b9..119696e 100644 --- a/Movegen.h +++ b/Movegen.h @@ -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; }