Skip to content

Add "Speed Mode" #2

@jaythomas

Description

@jaythomas

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions