feat : add piece drag hint

This commit is contained in:
GuillaumeSD
2024-03-19 01:56:35 +01:00
parent cd927ed6d7
commit 4864bf61f5
7 changed files with 113 additions and 82 deletions

View File

@@ -90,7 +90,7 @@ export abstract class UciEngine {
return this.ready;
}
private async stopSearch(): Promise<void> {
public async stopSearch(): Promise<void> {
await this.sendCommands(["stop", "isready"], "readyok");
}
@@ -243,7 +243,7 @@ export abstract class UciEngine {
fen: string,
skillLevel: number,
depth = 16
): Promise<string> {
): Promise<string | undefined> {
this.throwErrorIfNotReady();
await this.setSkillLevel(skillLevel);
@@ -260,6 +260,6 @@ export abstract class UciEngine {
throw new Error("No move found");
}
return move;
return move === "(none)" ? undefined : move;
}
}