feat : add engines choices

This commit is contained in:
GuillaumeSD
2024-04-14 04:07:18 +02:00
parent 56b267762e
commit 1546709452
20 changed files with 172 additions and 37 deletions

View File

@@ -1,4 +1,4 @@
import { Color } from "@/types/enums";
import { Color, EngineName } from "@/types/enums";
import { CurrentPosition } from "@/types/eval";
import { Chess } from "chess.js";
import { atom } from "jotai";
@@ -6,5 +6,6 @@ import { atom } from "jotai";
export const gameAtom = atom(new Chess());
export const gameDataAtom = atom<CurrentPosition>({});
export const playerColorAtom = atom<Color>(Color.White);
export const enginePlayNameAtom = atom<EngineName>(EngineName.Stockfish16);
export const engineSkillLevelAtom = atom<number>(1);
export const isGameInProgressAtom = atom(false);