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

Make colors assigned to users deterministic #6

Open
tyilo opened this issue Aug 19, 2019 · 0 comments
Open

Make colors assigned to users deterministic #6

tyilo opened this issue Aug 19, 2019 · 0 comments
Assignees

Comments

@tyilo
Copy link
Member

tyilo commented Aug 19, 2019

Otherwise we can't have matching colors on the webpage.

This line needs to change:

user.color = this.userColors.splice(Math.floor(Math.random() * this.userColors.length), 1)[0];

It should be based on the index of the player, so shuffling the positions of players, would also change the assigned colors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants