fix rng stanze
This commit is contained in:
14
app.js
14
app.js
@@ -741,18 +741,10 @@
|
||||
let players = [];
|
||||
let currentBet = null; // {roomId}
|
||||
|
||||
function prestige(roomId) {
|
||||
const r = roomById[roomId];
|
||||
return (r.jacuzzi ? 2 : 0) + (r.posti === 1 ? 1 : 0);
|
||||
}
|
||||
|
||||
function buildRevealOrder() {
|
||||
// svelati per prestigio crescente: le stanze con jacuzzi (jackpot) per ultime
|
||||
const people = PARTICIPANTS.map((p) => p.nome);
|
||||
return Matching.shuffle(people, Math.random).sort(
|
||||
(a, b) =>
|
||||
prestige(assignment.byPerson[a]) - prestige(assignment.byPerson[b]),
|
||||
);
|
||||
// ordine completamente casuale: ogni persona (e quindi ogni stanza, anche
|
||||
// quelle con idromassaggio) può uscire in qualsiasi momento
|
||||
return Matching.shuffle(PARTICIPANTS.map((p) => p.nome), Math.random);
|
||||
}
|
||||
|
||||
function newGame(keepChips) {
|
||||
|
||||
Reference in New Issue
Block a user