UNPKG

nodegame-game-template

Version:

Template files for a standard nodeGame game

23 lines (19 loc) 521 B
/** * # Bot type implementation of the game stages * Copyright(c) {YEAR} {AUTHOR} <{AUTHOR_EMAIL}> * MIT Licensed * * http://www.nodegame.org * --- */ module.exports = function(treatmentName, settings, stager, setup, gameRoom, node) { stager.setDefaultCallback(function() { node.timer.random.done(); }); stager.extendStep('game', { cb: () => { node.timer.random.done({ greater: Math.random() > 0.5 }); } }); };