nodegame-game-template
Version:
Template files for a standard nodeGame game
39 lines (28 loc) • 824 B
JavaScript
/**
* # Game stages definition file
* Copyright(c) {YEAR} {AUTHOR} <{AUTHOR_EMAIL}>
* MIT Licensed
*
* Stages are defined using the stager API
*
* http://www.nodegame.org
* ---
*/
module.exports = function(treatmentName, settings, stager, setup, gameRoom) {
stager
.stage('instructions')
.stage('quiz')
.repeatStage('game', settings.ROUNDS)
.step('guess')
.step('results')
.stage('end')
.gameover();
// Notice: here all stages but 'game' have
// one step named after the stage.
// Skip one stage.
// stager.skip('instructions');
// Skip multiple stages:
// stager.skip([ 'instructions', 'quiz' ])
// Skip a step within a stage:
// stager.skip('game', 'results');
};