mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: full logic
This commit is contained in:
1 parent
232f24181f
commit
c8cb490b48
8 files changed
+210
-44
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import type { TankDefinition } from '@blitzkit/core';
|
||||
import { create } from 'zustand';
|
||||
import { createContextualStore } from '../core/zustand/createContextualStore';
|
||||
|
||||
export interface GuessEphemeral {
|
||||
tank: TankDefinition;
|
||||
// true = correct, false = incorrect, null = not guessed
|
||||
guessState: boolean | null;
|
||||
totalSeen: number;
|
||||
correct: number;
|
||||
}
|
||||
|
||||
export const GuessEphemeral = createContextualStore((tank: TankDefinition) =>
|
||||
create<GuessEphemeral>()(() => ({
|
||||
tank,
|
||||
guessState: null,
|
||||
totalSeen: 0,
|
||||
correct: 0,
|
||||
})),
|
||||
);
|
||||
Reference in new issue
Block a user