✨ (gameState): Prepare future props
This commit is contained in:
@@ -1,5 +1,16 @@
|
|||||||
import { atom } from 'recoil';
|
import { atom } from 'recoil';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Values:
|
||||||
|
* - Status: 'settings' | 'idle' | 'playing' | 'board'
|
||||||
|
* - Difficulty: 'begginer' | 'intermediate' | 'expert'
|
||||||
|
* - Grid Size: 12, 16, 20
|
||||||
|
* - Bombs: ]0;{GridSize}]
|
||||||
|
* - Placed Flags: [0;{GridSize}]
|
||||||
|
* - gameTime: Timestamp
|
||||||
|
* - End Type: 'win' | 'loose'
|
||||||
|
*/
|
||||||
|
|
||||||
export const gameStateAtom = atom({
|
export const gameStateAtom = atom({
|
||||||
key: 'gameState',
|
key: 'gameState',
|
||||||
default: {
|
default: {
|
||||||
@@ -8,5 +19,7 @@ export const gameStateAtom = atom({
|
|||||||
gridSize: 12,
|
gridSize: 12,
|
||||||
bombs: 0,
|
bombs: 0,
|
||||||
placedFlags: 0,
|
placedFlags: 0,
|
||||||
|
gameTime: 0,
|
||||||
|
endType: '',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user