Randomize player order
This commit is contained in:
parent
3fee93abe8
commit
bfab5672f7
1 changed files with 4 additions and 1 deletions
|
|
@ -187,7 +187,10 @@ io.on('connection', (socket) => {
|
|||
game.leader = leader;
|
||||
|
||||
var remaining_players = game.players.filter(e => e !== leader);
|
||||
game.actual_players = remaining_players;
|
||||
game.actual_players = remaining_players.sort((a, b) => 0.5 - Math.random());
|
||||
|
||||
|
||||
|
||||
game.player_turns = game.actual_players.concat(game.actual_players);
|
||||
|
||||
var fake_artist = remaining_players[Math.floor(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue