Skip to content

Commit

Permalink
fix: if new round is the same player no show spellboard
Browse files Browse the repository at this point in the history
  • Loading branch information
chiumomo committed Nov 29, 2024
1 parent badc795 commit fdbd810
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/stores/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ export const useGameStore = defineStore('useGameStore', () => {
setPlayDice(status.dice_result)
setShowDice(true)
updateTmpGameStatus(status)
} else if (status.event_name === 'round_started') {
spellFailed.value = false
} else if (status.event_name === 'spell_owl') {
console.log('select secret')
if (myTurn.value){
Expand Down Expand Up @@ -200,8 +202,14 @@ export const useGameStore = defineStore('useGameStore', () => {
const setSpellFailed = (value) => {
spellFailed.value = value
}
const roundStart = (() => {
if ((gameStatus.value.event_name === 'roundStart')) {
return true
}
})
return {
gameStatus,
roundStart,
gameOver,
playingId,
playingIndex,
Expand Down

0 comments on commit fdbd810

Please sign in to comment.