Skip to content

Events spec

Marks Polakovs edited this page Mar 7, 2017 · 1 revision

BSQ events

This spec describes the flow of events through the application's lifetime.

Note: where the spec says fires event X, for conciseness, what is actually meant is fires GameEvent with property X, and when fires state X, what is meant is fires a GameStateChangeEvent with state GameState.State.X

Initial creation

The initial game state is NOTREADY. When the intro is played, the server fires state INTRO, and then READY.

When each device connects, it sends a IdentifyUserRequest. The server responds with the device's team number and member names (TODO: NYI).

User ready

When the user presses the "ready" button, the client sends a UserReadyRequest. The server fires to ADMIN AdminClientReadyPercentageUpdateEvent. Once all clients are ready, the server fires eventSTARTING.

Question starts

When the game master activates a question, the ADMIN fires a AdminSetActiveQuestionRequest. The server fires state QUESTION_ANSWERING to all clients, which are expected to show the question UI.

Question answered

Clients fire AnswerQuestionRequest. Server fires to ADMIN AdminQuestionAnsweredEvent. If game state is QUESTION_LIVEANSWERS, the server fires to BIGSCREEN BigscreenQuestionPercentageUpdateEvent.

Question state change

ADMIN fires AdminChangeQuestionStateRequest. Server fires event GameStateChangeEvent with new state.

Clone this wiki locally