mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: hide tanks from lost if placed
This commit is contained in:
1 parent
6ace0aa38a
commit
258279205d
4 files changed
+14
-3
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { enableMapSet } from 'immer';
|
||||
import { create } from 'zustand';
|
||||
import { subscribeWithSelector } from 'zustand/middleware';
|
||||
import { tierListRows } from '../components/TierList/Table/constants';
|
||||
@@ -6,13 +7,17 @@ import { createContextualStore } from '../core/zustand/createContextualStore';
|
||||
export interface TierList {
|
||||
dragging: boolean;
|
||||
tanks: number[][];
|
||||
placedTanks: Set<number>;
|
||||
}
|
||||
|
||||
enableMapSet();
|
||||
|
||||
export const TierList = createContextualStore(() =>
|
||||
create<TierList>()(
|
||||
subscribeWithSelector<TierList>(() => ({
|
||||
dragging: false,
|
||||
tanks: tierListRows.map(() => []),
|
||||
placedTanks: new Set(),
|
||||
})),
|
||||
),
|
||||
);
|
||||
Reference in new issue
Block a user