FINISHED Phase — Functional Specification
1. Purpose of FINISHED
The FINISHED phase exists to:
- Provide closure to the game session
- Present final results in a shared, passive format
- Highlight collective and individual achievements without exposing personal data
- Define clear conditions for session termination
The FINISHED phase is read-only, non-interactive, and time-bounded.
2. Scope & Non-Goals
In scope
- Common-screen presentation (credits-style)
- Final player ordering and display
- Presentation of derived statistical facts
- Session termination handling
Explicitly out of scope
- Score calculation or modification
- Player interaction beyond session exit
- New game initialization
- Personal or identifying data exposure
3. Core Concepts (Mental Model)
Final Credits Sequence (FCS)
The FINISHED phase is represented as a Final Credits Sequence, similar to movie credits:
- Automatically scrolling
- Same content and order for all players
- Passive observation only
The sequence may loop until the session terminates.
4. Data Responsibilities
4.1 Final Player Results (Immutable)
Each player has:
- Final score
- Rank
- Accuracy metrics
- Timing metrics (aggregated)
Rules:
- Data is finalized before entering FINISHED
- No values may change during FINISHED
- No new data may be added
4.2 Derived Statistics Dataset
Derived from game-wide data:
- Answer correctness
- Answer timing
- Answer deltas (distance from correct answer)
- Consistency metrics
This dataset is input to the FINISHED statistics projection.
5. Statistics & Fact Projection (FINISHED)
Purpose
To generate highlight-style statistical facts that summarize notable outcomes of the game.
Characteristics
- Deterministic given the same input
- Non-personal
- Explainable
- Generated once and frozen
Example Fact Categories
- Winner (highest score)
- Fastest to answer
- Slowest to answer
- Most correct answers
- Smallest average delta
- Most consistent answers
- Largest improvement over time
6. Presentation Rules
Ordering
- Winner always displayed at the top
- Remaining players ordered by descending score
- Ties resolved deterministically
- Ordering must be stable across all clients
Display
- Credits-style vertical scroll
- Shared pacing across all clients
- No user-controlled navigation
- Optional looping until session termination
7. FINISHED Flow Control
Entry Conditions
- REVIEWING phase has completed
- All question reviews are finalized
- Final scores and statistics are available
Session Termination Conditions
The FINISHED phase ends when any of the following occurs:
- A player console stops pinging the server beyond a defined timeout
- A player explicitly selects “Join New Game”
- A server-defined idle timeout is reached
Exit Behavior
- Session is marked as terminated
- No further events are accepted
- Resources may be released
- FINISHED data becomes archival
8. State Transitions
REVIEWING → FINISHED
Occurs when:
- Final question review completes
- REVIEWING exit criteria are met
FINISHED → SESSION_TERMINATED
Occurs when:
- Any termination condition is triggered
9. Invariants (Must Always Hold)
- No score changes during FINISHED
- No personal or identifying data is displayed
- All players see the same credits sequence
- Facts do not change once generated
- FINISHED contains no interactive gameplay elements
10. Test Strategy
10.1 Static Validation Tests
- Final results exist for all players
- All statistics are computable
- Fact projection produces valid output
10.2 Presentation Tests
- Correct ordering of players
- Winner always displayed first
- Stable ordering across clients
- Scroll behavior matches specification
10.3 Statistics Tests
- Each fact is derivable from stored data
- No fact references raw or personal data
- Facts remain constant during FINISHED
10.4 Termination Tests
- Session ends on ping timeout
- Session ends on join-new-game event
- Session ends on idle timeout
- No events accepted after termination
11. Acceptance Criteria
A player can:
- Clearly see who won
- Understand how players performed collectively
- Observe interesting outcomes of the game
- Exit the session naturally
Without:
- Being able to infer personal or sensitive information
- Affecting game state