mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Small simplification to Position::see
Verified there are no hidden bugs and is actually a speed optimization: Fixed games at 15+0.05 TC ELO: 1.72 +-2.9 (95%) LOS: 87.5% Total: 20000 W: 3741 L: 3642 D: 12617 No functional change
This commit is contained in:
parent
cabd512916
commit
a08a21d5a0
1 changed files with 2 additions and 4 deletions
|
@ -1077,7 +1077,6 @@ int Position::see(Move m) const {
|
||||||
|
|
||||||
// Add the new entry to the swap list
|
// Add the new entry to the swap list
|
||||||
swapList[slIndex] = -swapList[slIndex - 1] + PieceValue[MG][captured];
|
swapList[slIndex] = -swapList[slIndex - 1] + PieceValue[MG][captured];
|
||||||
++slIndex;
|
|
||||||
|
|
||||||
// Locate and remove the next least valuable attacker
|
// Locate and remove the next least valuable attacker
|
||||||
captured = min_attacker<PAWN>(byTypeBB, to, stmAttackers, occupied, attackers);
|
captured = min_attacker<PAWN>(byTypeBB, to, stmAttackers, occupied, attackers);
|
||||||
|
@ -1086,10 +1085,9 @@ int Position::see(Move m) const {
|
||||||
|
|
||||||
// Stop before processing a king capture
|
// Stop before processing a king capture
|
||||||
if (captured == KING && stmAttackers)
|
if (captured == KING && stmAttackers)
|
||||||
{
|
|
||||||
swapList[slIndex++] = QueenValueMg * 16;
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
++slIndex;
|
||||||
|
|
||||||
} while (stmAttackers);
|
} while (stmAttackers);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue