fix rng stanze
This commit is contained in:
14
app.js
14
app.js
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user