Fix slider blockers for banner
authorFabian Fichter <ianfab@users.noreply.github.com>
Sun, 26 Jan 2020 12:07:16 +0000 (13:07 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sun, 26 Jan 2020 12:07:16 +0000 (13:07 +0100)
No functional change for all variants except manchu.

src/position.cpp

index cd392af..e52f6d7 100644 (file)
@@ -753,7 +753,7 @@ Bitboard Position::slider_blockers(Bitboard sliders, Square s, Bitboard& pinners
     Square sniperSq = pop_lsb(&snipers);
     Bitboard b = between_bb(s, sniperSq) & occupancy;
 
-    if (b && (!more_than_one(b) || (type_of(piece_on(sniperSq)) == CANNON && popcount(b) == 2)))
+    if (b && (!more_than_one(b) || ((AttackRiderTypes[type_of(piece_on(sniperSq))] & HOPPING_RIDERS) && popcount(b) == 2)))
     {
         blockers |= b;
         if (b & pieces(color_of(piece_on(s))))