-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Milestone
Description
In speed mode, a player must make a move in X seconds to play a move on their turn or to respond to an attack. The timer is reset every time they make a valid move. This will cause a breaking change to the API. Currently, the API expects:
const language = 'en'
const game = new JunkyardBrawl(userId, userName, announceCallback, whisperCallback, language)But to keep things simple we can change the 5th parameter to an "options" object:
const options = { lang: 'en', speed: 10 }
const game = new JunkyardBrawl(userId, userName, announceCallback, whisperCallback, options)If speed is set to 10, for instance, the player response limit will be 10 seconds. If speed is set to <= 0, null, or undefined, speed mode will be disabled.