diff --git a/src/stores/game.ts b/src/stores/game.ts index 59c3524..8cfe880 100644 --- a/src/stores/game.ts +++ b/src/stores/game.ts @@ -3,6 +3,7 @@ import { defineStore } from 'pinia' export const useGameStore = defineStore('game', { state: (): GameState => ({ + id: 0x000000, board: [ { row: 'A', fields: [0, 0, 0] }, { row: 'B', fields: [0, 0, 0] }, @@ -33,6 +34,8 @@ export const useGameStore = defineStore('game', { }), actions: { initGame() { + this.id = 0x000000 + this.password = undefined this.board = [ { row: 'A', fields: [0, 0, 0] }, { row: 'B', fields: [0, 0, 0] }, @@ -68,6 +71,8 @@ export const useGameStore = defineStore('game', { }) interface GameState { + id: number + password?: string board: Array<{ row: 'A' | 'B' | 'C' fields: Array