From 7e7ea3eabc1be6bf5827e58dfd74030a33682fed Mon Sep 17 00:00:00 2001 From: ksthicke <85892703+ksthicke@users.noreply.github.com> Date: Thu, 16 May 2024 21:35:43 -0500 Subject: [PATCH] remove ignore --- src/renderer/engine/driver.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/renderer/engine/driver.js b/src/renderer/engine/driver.js index e3e94a0..1767329 100644 --- a/src/renderer/engine/driver.js +++ b/src/renderer/engine/driver.js @@ -26,7 +26,6 @@ export default class EngineDriver { */ constructor (input, output) { this.events = new EventEmitter() - this.ignore = false this.ready = false this.pendingReady = false this.info = { @@ -67,12 +66,6 @@ export default class EngineDriver { _parseLine (line) { this.events.emit('line', line) line = line.trim() - if (this.ignore) { - if (line.startsWith('bestmove')) { - this.ignore = false - } - return - } switch (line.split(/\s/)[0].trim()) { case 'uciok': this.events.emit('initialized') @@ -122,6 +115,7 @@ export default class EngineDriver { break } case 'bestmove': + console.log('emit bestmove') const words = line.split(' ') const ucimove = words[1] this.events.emit('bestmove', ucimove) @@ -160,7 +154,6 @@ export default class EngineDriver { case 'quit': return await this.quit() case 'stop': - this.ignore = true this._write(cmd) break case 'setoption':