fix rng stanze

This commit is contained in:
2026-07-02 15:08:38 +02:00
parent ced6daee20
commit efe2ef2a76

14
app.js
View File

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