Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Speed Mode" #2

Open
jaythomas opened this issue Nov 12, 2017 · 0 comments
Open

Add "Speed Mode" #2

jaythomas opened this issue Nov 12, 2017 · 0 comments
Milestone

Comments

@jaythomas
Copy link
Member

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.

@jaythomas jaythomas added this to the v1.0.0 milestone Nov 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant