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