From 632319d62292f48a8f80ef8077c7d90a0b20e4b4 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Sat, 9 Nov 2024 13:28:06 +0100 Subject: [PATCH] added game id and password --- src/stores/game.ts | 5 +++++ 1 file changed, 5 insertions(+) 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