Skip to content

Commit

Permalink
always infer info except when playing single colour
Browse files Browse the repository at this point in the history
Was there some reason we weren't generally doing this?  It's not strictly needed since the info will be generated very shortly by the engine, but it does reduce the feeling of lag.
  • Loading branch information
fohristiwhirl committed Mar 16, 2021
1 parent c1a8ecc commit 33334ab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/95_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,15 @@ function NewRenderer() {
//
// The whole thing is a bit sketchy, maybe.

if (config.behaviour !== "halt" && config.behaviour !== "analysis_locked") {
if (config.behaviour === "play_white" || config.behaviour === "play_black") {
return;
}

let node = this.tree.node;

if (node.terminal_reason() !== "") {
return;
}
if (!node.parent) {
return;
}
Expand Down Expand Up @@ -297,7 +300,6 @@ function NewRenderer() {

let new_info = NewInfo(node.board, nextmove);


new_info.__ghost = true;
new_info.__touched = true;
new_info.pv = pv;
Expand Down

0 comments on commit 33334ab

Please sign in to comment.