Skip to content

Commit

Permalink
Fix want_to_go when clicking for the engine
Browse files Browse the repository at this point in the history
  • Loading branch information
rooklift committed Mar 3, 2024
1 parent ac2cfd9 commit bd39653
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/modules/hub.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,16 @@ let hub_main_props = {

// Figure out whether we want the engine to be running...

let want_to_go = Boolean(this.engine.desired) || this.playing_active_colour();
let want_to_go;

// want_to_go = Boolean(this.engine.desired) || this.playing_active_colour(); -- is a WRONG AND BAD TEST.
// Caused Issue 120. If playing vs the machine, but we click for it, this test gave the wrong outcome.

if ([PLAY_BLACK, PLAY_WHITE].includes(this.play_mode)) {
want_to_go = this.playing_active_colour();
} else {
want_to_go = Boolean(this.engine.desired);
}

if (!opts.keep_selfplay && this.play_mode === SELFPLAY) {
this.set_play_mode(NORMAL);
Expand Down

0 comments on commit bd39653

Please sign in to comment.