cm-engine-runner 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cm-engine-runner",
3
3
  "description": "Abstraction layer to run chess engines, supports opening books",
4
- "version": "1.1.2",
4
+ "version": "1.1.3",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "scripts": {
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "homepage": "https://github.com/shaack/cm-chess-engine-adapter#readme",
27
27
  "devDependencies": {
28
- "teevi": "^2.2.3"
28
+ "teevi": "^2.2.4"
29
29
  },
30
30
  "dependencies": {
31
31
  "cm-polyglot": "^1.0.7",
@@ -21,7 +21,8 @@ export class EngineRunner {
21
21
  }
22
22
  Object.assign(this.props, props)
23
23
  this.engineState = ENGINE_STATE.LOADING
24
- this.initialization = this.init()
24
+ this.initialized = this.init()
25
+ this.initialization = this.initialized // TODO @deprecated use initialized
25
26
  }
26
27
 
27
28
  init() {
@@ -32,4 +33,4 @@ export class EngineRunner {
32
33
 
33
34
  }
34
35
 
35
- }
36
+ }
@@ -44,11 +44,11 @@ export class PolyglotRunner extends EngineRunner {
44
44
  resolve(propabilityMatrix[luckyIndex])
45
45
  })
46
46
  return new Promise((resolve) => {
47
- Promise.all([this.initialization, timeoutPromise, calculationPromise]).then((values) => {
47
+ Promise.all([this.initialized, timeoutPromise, calculationPromise]).then((values) => {
48
48
  this.engineState = ENGINE_STATE.READY
49
49
  resolve(values[2])
50
50
  })
51
51
  })
52
52
  }
53
53
 
54
- }
54
+ }