2021-08-13 20:39:49 +00:00
|
|
|
export const state = () => ({
|
2021-08-15 16:52:15 +00:00
|
|
|
state: "",
|
|
|
|
phase: "",
|
2022-02-27 19:54:13 +00:00
|
|
|
name: "",
|
2021-08-13 20:39:49 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
export const mutations = {
|
2021-08-15 20:04:10 +00:00
|
|
|
setStateAndPhase(state, game) {
|
|
|
|
if (game) {
|
2022-02-27 19:54:13 +00:00
|
|
|
const { state: gameState, phase, name } = game
|
2021-08-15 20:04:10 +00:00
|
|
|
state.state = gameState
|
|
|
|
state.phase = phase
|
2022-02-27 19:54:13 +00:00
|
|
|
state.name = name
|
2021-08-26 10:23:32 +00:00
|
|
|
} else {
|
2021-08-15 20:04:10 +00:00
|
|
|
state.state = ""
|
|
|
|
state.phase = ""
|
2022-02-27 19:54:13 +00:00
|
|
|
state.name = ""
|
2021-08-15 20:04:10 +00:00
|
|
|
}
|
2021-08-13 20:39:49 +00:00
|
|
|
},
|
|
|
|
}
|