Skip to content

Commit

Permalink
No need for minDepth if it's mate - #585
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererXII committed Aug 28, 2022
1 parent 8f3991d commit afc5e8d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ui/ceval/src/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,14 @@ export class Protocol {
// Track max pv index to determine when pv prints are done.
if (this.expectedPvs < multiPv) this.expectedPvs = multiPv;

if (depth < minDepth || !defined(nodes) || !defined(elapsedMs) || !defined(isMate) || !defined(povEv)) return;
if (
(depth < minDepth && !isMate) ||
!defined(nodes) ||
!defined(elapsedMs) ||
!defined(isMate) ||
!defined(povEv)
)
return;

const pivot = this.work.threatMode ? 0 : 1;
const ev = this.work.ply % 2 === pivot ? -povEv : povEv;
Expand Down

0 comments on commit afc5e8d

Please sign in to comment.