File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -546,6 +546,9 @@ namespace {
546546 const int RookCheck = 688 ;
547547 const int BishopCheck = 588 ;
548548 const int KnightCheck = 924 ;
549+ #ifdef ATOMIC
550+ const int IndirectKingAttack = 1000 ;
551+ #endif
549552
550553#ifdef THREECHECK
551554 // In Q8 fixed point
@@ -883,7 +886,10 @@ namespace {
883886
884887#ifdef ATOMIC
885888 if (pos.is_atomic ())
889+ {
890+ kingDanger += IndirectKingAttack * popcount (pos.attacks_from <KING>(pos.square <KING>(Us)) & pos.pieces (Us) & ei.attackedBy [Them][ALL_PIECES]);
886891 score -= make_score (100 , 100 ) * popcount (ei.attackedBy [Us][KING] & pos.pieces ());
892+ }
887893#endif
888894 // Transform the kingDanger units into a Score, and substract it from the evaluation
889895 if (kingDanger > 0 )
You can’t perform that action at this time.
0 commit comments