Game Sequence v7 - nodeGame/nodegame GitHub Wiki

The Game Sequence is the sequence of the stages and steps of a game:

  • step: the basic unit of execution of a game, at least including an HTML page, and some code to handle user interaction with the page and with the server;
  • stage: a collection of steps, which could contain any number of steps, from 1 to ... a very large number.

Defining a Game Sequence

  1. instructions are shown to the participants
  2. a verification quiz is performed;
  3. a game is repeated for 3 rounds where participants make one decision simultaneously, then the results are displayed.

The game sequence is defined in file game/game.stages.js:

// First stage (contains one default step).
stager.stage('instructions');

// Second stage (contains one default step).
stager.stage('verification_quiz');

// Third stage repeats its steps 3 times in the order they are added.
stager.repeatStage('game', 3);
stager.step('decision');
stager.step('results');

To learn more read the full Stager-API.

Implementing the Game Sequence

At this point, the game sequence is still empty and it must be implemented in a client type.

Next Topics

⚠️ **GitHub.com Fallback** ⚠️