Skip to content

Commit 9169333

Browse files
committed
Brought back the feature where we would see random result on the host
1 parent f85fec3 commit 9169333

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

frontend/src/stores/game.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ export const useGameStore = defineStore("game", {
3535
dailydoubleTrigger: 0,
3636
socket: null,
3737
rouletteTarget: null,
38+
// Set by HostView on mount. Host skips the roulette animation and jumps
39+
// straight to the winner so the operator can re-roll quickly for showmanship.
40+
isHost: false,
3841
}),
3942

4043
getters: {
@@ -180,6 +183,10 @@ export const useGameStore = defineStore("game", {
180183
if (!sequence || sequence.length === 0) return;
181184
// Clear any pending roulette first.
182185
if (this._rouletteTimer) clearInterval(this._rouletteTimer);
186+
if (this.isHost) {
187+
this.ui_state.team = sequence[sequence.length - 1];
188+
return;
189+
}
183190
const queue = [...sequence];
184191
this._rouletteTimer = setInterval(() => {
185192
if (queue.length === 0) {

frontend/src/views/HostView.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function resetAnswers() {
2323
}
2424
2525
onMounted(async () => {
26+
game.isHost = true;
2627
if (!game.initialized) await game.refresh();
2728
if (!game.isInProgress) {
2829
router.push({ name: "start" });

0 commit comments

Comments
 (0)