viewer: show your own public hand-value range (what others see for you)

Next to your exact hand total, show the min–max range other players see for
you (your card types are public, only the values are hidden), with their
best-guess average in parentheses — the same computation handValueRange does
for opponents. Only shown when the range is non-trivial (min != max).
This commit is contained in:
coyotte508 2026-08-28 19:52:06 +00:00
commit f900ece047

View file

@ -127,6 +127,18 @@
</span>
{#if isMe}
<span class="cash" title="total hand value in credits">◈ {store.myHandValue}</span>
{#if player.hand.length > 0}
{@const range = handValueRange(player)}
{#if range.min !== range.max}
<span
class="cash dim selfrange"
title="the hand-value range other players see for you: your card types are public, only the values are hidden (their best guess in parentheses)"
>
{range.min}–{range.max}
<span class="avg">(~{Math.round(handValueExpected(player))})</span>
</span>
{/if}
{/if}
{:else if player.hand.length > 0}
{@const range = handValueRange(player)}
<span
@ -491,6 +503,13 @@
color: color-mix(in srgb, var(--gold) 65%, var(--text-dim));
font-weight: 600;
}
/* Your own public range (what others see for you) sits next to your exact
total, smaller and dimmer so it reads as secondary information. */
.stats .cash.selfrange {
font-size: 10.5px;
font-weight: 500;
opacity: 0.85;
}
.stats .avg {
opacity: 0.75;
font-weight: 500;