The Acting screen is the live stage for a Charades round. It shows the countdown timer front and centre while the performer mimes their movie, and gives the host two round-ending controls: one for a correct guess and one for an early surrender. GET /actingDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/dlampatricio/lamubi/llms.txt
Use this file to discover all available pages before exploring further.
Timer Behavior
TheTimer component renders the current timer value from the game store as a large, bold numeral. It counts down by one every second via decrementTimer() — driven by a setTimeout inside a useEffect.
| State | Behaviour |
|---|---|
timer >= 10 | Numeral rendered in the default text-text-primary colour |
timer < 10 | Numeral switches to text-red-600 as a visual urgency signal |
timer <= 0 | endRound() is called automatically, then the router navigates to /result via router.replace('/result') |
initial_timer (set in the Lobby) and is reset to that value at the start of every turn by nextTeam().
Actions
Guessed! → /result
Guessed! → /result
Rendered as a large
NavButton (styled with py-6 rounded-3xl text-2xl).Sequence:- Calls
correctGuess()— increments the current team’sscoreby1in the store. - Calls
endRound()— setsgame_stateto'finished'. - Navigates to
/result.
Surrender (two-step confirm) → /result
Surrender (two-step confirm) → /result
The Surrender button is a two-step flow controlled by local
The confirmation row fades in with the
surrenderConfirm state.Step 1 — Surrender label visible:- The button is styled as a muted uppercase text link.
- Pressing it sets
surrenderConfirm = true, which replaces the button with the confirmation row.
surrenderConfirm === true):| Button | Colour | Action |
|---|---|---|
| Give Up | bg-red-600 | Calls endRound() → game_state = 'finished', then router.replace('/result'). No point awarded. |
| Cancel | bg-surface-secondary | Sets surrenderConfirm = false, restoring the original Surrender button. |
animate-fade-in class so the transition is not jarring during a live round.Guard Redirect
On mount, the acting screen checks whether the game is in the correct state:game_state is anything other than 'acting' when the component mounts — for example after a page refresh or a direct URL visit — the user is immediately redirected to /lobby. This prevents the timer from running against a stale or uninitialized game state.