Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0f75d0c14 |
@@ -146,7 +146,7 @@ body {
|
||||
}
|
||||
|
||||
.tableHint {
|
||||
color: #888;
|
||||
color: #949494;
|
||||
font-size: 0.8rem;
|
||||
text-align: center;
|
||||
margin-top: 1rem;
|
||||
@@ -357,7 +357,7 @@ body {
|
||||
}
|
||||
|
||||
.seatEmptyLabel {
|
||||
color: #6d6d6d;
|
||||
color: #8a8a8a;
|
||||
font-size: 0.6rem;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
@@ -373,7 +373,7 @@ body {
|
||||
top: 2px;
|
||||
left: 6px;
|
||||
font-size: 0.58rem;
|
||||
color: #777;
|
||||
color: #8a8a8a;
|
||||
}
|
||||
|
||||
.seatPuckName {
|
||||
@@ -578,7 +578,7 @@ body {
|
||||
|
||||
.cardSlot.cardSlotEmpty {
|
||||
background: #191919;
|
||||
color: #5c5c5c;
|
||||
color: #8a8a8a;
|
||||
border-style: dashed;
|
||||
border-color: #3f3f3f;
|
||||
box-shadow: none;
|
||||
@@ -694,7 +694,7 @@ body {
|
||||
}
|
||||
|
||||
.addChipsCurrency {
|
||||
color: #777;
|
||||
color: #8a8a8a;
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
@@ -735,7 +735,7 @@ body {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
color: #a9782f;
|
||||
color: #d8b46a;
|
||||
font-family: inherit;
|
||||
font-size: 0.78rem;
|
||||
text-decoration: underline;
|
||||
@@ -834,7 +834,7 @@ body {
|
||||
margin: 0;
|
||||
padding-top: 0.6rem;
|
||||
border-top: 1px solid #2c2c2c;
|
||||
color: #7a7a7a;
|
||||
color: #8a8a8a;
|
||||
font-size: 0.72rem;
|
||||
line-height: 1.45;
|
||||
}
|
||||
@@ -1213,7 +1213,7 @@ body {
|
||||
|
||||
.subPanel summary {
|
||||
cursor: pointer;
|
||||
color: #8f8f8f;
|
||||
color: #9a9a9a;
|
||||
font-size: 0.78rem;
|
||||
}
|
||||
|
||||
@@ -1249,7 +1249,7 @@ body {
|
||||
|
||||
.fieldHint {
|
||||
font-size: 0.75rem;
|
||||
color: #888;
|
||||
color: #949494;
|
||||
line-height: 1.4;
|
||||
margin: 0;
|
||||
}
|
||||
@@ -1306,7 +1306,7 @@ body {
|
||||
}
|
||||
|
||||
.standingsHeader {
|
||||
color: #777;
|
||||
color: #8a8a8a;
|
||||
font-size: 0.7rem;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
@@ -1374,7 +1374,7 @@ body {
|
||||
|
||||
.handHistoryTime {
|
||||
margin-left: auto;
|
||||
color: #777;
|
||||
color: #8a8a8a;
|
||||
font-size: 0.72rem;
|
||||
}
|
||||
|
||||
@@ -1494,7 +1494,7 @@ body.hasActionBar #holdemSidebar {
|
||||
flex: none;
|
||||
min-width: 3.1rem;
|
||||
text-align: right;
|
||||
color: #7d7d7d;
|
||||
color: #949494;
|
||||
font-variant-numeric: tabular-nums;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
@@ -1732,7 +1732,7 @@ body.hasActionBar #holdemSidebar {
|
||||
|
||||
.seatPuckStack {
|
||||
font-size: 0.58rem;
|
||||
color: #8f8f8f;
|
||||
color: #9a9a9a;
|
||||
font-variant-numeric: tabular-nums;
|
||||
margin-top: 0.1rem;
|
||||
}
|
||||
@@ -1836,7 +1836,7 @@ body.hasActionBar #toastHost {
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: #888;
|
||||
color: #949494;
|
||||
font-size: 0.8rem;
|
||||
font-family: inherit;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -18,7 +18,6 @@ const PotWizard = {
|
||||
this.playerLabelById = new Map(
|
||||
players.map(p => [p.id, this.labelFor(p, state.seats.indexOf(p))])
|
||||
);
|
||||
this.seatIndexById = new Map(players.map(p => [p.id, state.seats.indexOf(p)]));
|
||||
const contributions = players.map(p => ({
|
||||
id: p.id,
|
||||
contribution: HoldemState.computeContribution(p, state.chipLegend, state.basePotAmount),
|
||||
@@ -50,20 +49,6 @@ const PotWizard = {
|
||||
this.totals.set(id, (this.totals.get(id) || 0) + amount);
|
||||
},
|
||||
|
||||
// A chopped pot rarely divides exactly, and the odd chip goes to the first player
|
||||
// left of the button — not to whoever the dealer happened to tick first. The
|
||||
// calculator hands leftovers out in the order it's given the winners, so ordering
|
||||
// them here is what makes the payout match the rule.
|
||||
orderFromButton(ids) {
|
||||
const distance = new Map();
|
||||
for (let step = 1; step <= this.state.seatCount; step++) {
|
||||
distance.set(HoldemState.nextSeatIndex(this.state, this.state.dealerSeatIndex, step), step);
|
||||
}
|
||||
return [...ids].sort((a, b) =>
|
||||
(distance.get(this.seatIndexById.get(a)) ?? 0) - (distance.get(this.seatIndexById.get(b)) ?? 0)
|
||||
);
|
||||
},
|
||||
|
||||
renderStep() {
|
||||
// Auto-resolve any round where only one player is left standing — nothing to ask.
|
||||
let contenders = PotCalculator.getContenders(this.entries);
|
||||
@@ -142,7 +127,7 @@ const PotWizard = {
|
||||
confirmBtn.addEventListener("click", () => {
|
||||
const selected = Array.from(choices.querySelectorAll("input:checked")).map(i => i.value);
|
||||
if (selected.length === 0) return;
|
||||
const result = PotCalculator.resolveRound(this.entries, this.orderFromButton(selected));
|
||||
const result = PotCalculator.resolveRound(this.entries, selected);
|
||||
this.recordRound(result);
|
||||
this.entries = result.updatedEntries;
|
||||
this.renderStep();
|
||||
|
||||
Reference in New Issue
Block a user