1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

Rewrite TBScore in uci_pv()

Streamline the code and make
it understandable.

No functional change.

Resolves #135
This commit is contained in:
Marco Costalba 2014-11-26 12:56:08 +01:00 committed by Joona Kiiski
parent 66f5cd3f9d
commit a43f633c19

View file

@ -1444,14 +1444,8 @@ moves_loop: // When in check and at SpNode search starts from here
Depth d = updated ? depth : depth - ONE_PLY;
Value v = updated ? RootMoves[i].score : RootMoves[i].prevScore;
bool tb = RootInTB;
if (tb)
{
if (abs(v) >= VALUE_MATE - MAX_PLY)
tb = false;
else
v = TBScore;
}
bool tb = RootInTB && abs(v) < VALUE_MATE - MAX_PLY;
v = tb ? TBScore : v;
if (ss.rdbuf()->in_avail()) // Not at first line
ss << "\n";