mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-23 05:07:14 +00:00
skip setting threatByLesser[KING]
It doesn't make sense for a king to move to a square threatened by a lesser piece, since that move would be illegal. closes https://github.com/official-stockfish/Stockfish/pull/6640 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
bc28ff15bd
commit
4c0878cb0b
+1
-1
@@ -136,7 +136,7 @@ ExtMove* MovePicker::score(MoveList<Type>& ml) {
|
||||
threatByLesser[ROOK] =
|
||||
pos.attacks_by<KNIGHT>(~us) | pos.attacks_by<BISHOP>(~us) | threatByLesser[KNIGHT];
|
||||
threatByLesser[QUEEN] = pos.attacks_by<ROOK>(~us) | threatByLesser[ROOK];
|
||||
threatByLesser[KING] = pos.attacks_by<QUEEN>(~us) | threatByLesser[QUEEN];
|
||||
threatByLesser[KING] = 0;
|
||||
}
|
||||
|
||||
ExtMove* it = cur;
|
||||
|
||||
Reference in New Issue
Block a user