added game id and password
This commit is contained in:
@@ -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<number>
|
||||
|
Reference in New Issue
Block a user