diff --git a/components/GameBoard.vue b/components/GameBoard.vue index 746ae61..1e6ab22 100644 --- a/components/GameBoard.vue +++ b/components/GameBoard.vue @@ -12,6 +12,30 @@ watch( playSound('/sounds/ding.mp3') } }) + +watch( + () => goStore.current_game?.losers, + () => { + if (goStore.self?.uuid && goStore.current_game?.losers && goStore.current_game.losers.includes(goStore.self.uuid)) { + showLoserScreen() + } + }) + +watch( + () => goStore.current_game?.ended, + () => { + if (goStore.current_game?.ended && goStore.self?.uuid && goStore.current_game?.losers && !goStore.current_game.losers.includes(goStore.self.uuid)) { + showWinnerScreen() + } + }) + +function showLoserScreen() { + // playSound('/sounds/ding.mp3') +} + +function showWinnerScreen() { + // playSound('/sounds/ding.mp3') +}