fix : lint warnings & errors

This commit is contained in:
GuillaumeSD
2024-02-25 02:19:13 +01:00
parent 8d15b7e1a2
commit 7412f708d0
6 changed files with 18 additions and 21 deletions

View File

@@ -2,14 +2,14 @@ import { EngineName } from "@/types/enums";
import { UciEngine } from "./uciEngine";
export class Stockfish16 extends UciEngine {
constructor(multiPv: number) {
constructor() {
const isWasmSupported = Stockfish16.isWasmSupported();
const enginePath = isWasmSupported
? "engines/stockfish-wasm/stockfish-nnue-16-single.js"
: "engines/stockfish.js";
super(EngineName.Stockfish16, enginePath, multiPv);
super(EngineName.Stockfish16, enginePath);
}
public static isWasmSupported() {

View File

@@ -10,12 +10,10 @@ export abstract class UciEngine {
private worker: Worker;
private ready = false;
private engineName: EngineName;
private multiPv: number;
private multiPv = 3;
constructor(engineName: EngineName, enginePath: string, multiPv: number) {
constructor(engineName: EngineName, enginePath: string) {
this.engineName = engineName;
this.multiPv = multiPv;
this.worker = new Worker(enginePath);
console.log(`${engineName} created`);