From e03277c223d0a63efedc13b3ddd987b28e5ec2aa Mon Sep 17 00:00:00 2001 From: Lucas Howard <11452064+lchoward@users.noreply.github.com> Date: Thu, 19 Feb 2026 00:38:59 -0800 Subject: [PATCH 1/2] Display pre-round and projected totals during play rounds Shows cumulative score context below each player's round score so players can make informed hit/stand decisions. Busted players show no score increase; the line is hidden when both values are zero. Fixes FLI-13 Co-Authored-By: Claude Opus 4.6 --- src/components/PlayRound/PlayRound.jsx | 14 ++++++++++++-- src/components/PlayRound/PlayRound.module.css | 14 ++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/components/PlayRound/PlayRound.jsx b/src/components/PlayRound/PlayRound.jsx index 26168e8..b7fe040 100644 --- a/src/components/PlayRound/PlayRound.jsx +++ b/src/components/PlayRound/PlayRound.jsx @@ -4,6 +4,7 @@ import { ACTIONS } from "../../context/gameReducer"; import { calculateScore } from "../../utils/scoring"; import { calculateBustChance } from "../../utils/bustCalculator"; import { decideAction, chooseFlipThreeTarget, chooseSecondChanceTarget } from "../../utils/computerStrategy"; +import { getPlayerTotal } from "../../utils/helpers"; import CardVisual from "../CardVisual/CardVisual"; import DeckTracker from "../DeckTracker/DeckTracker"; import styles from "./PlayRound.module.css"; @@ -268,6 +269,8 @@ export default function PlayRound() { const busted = hand.status === "busted"; const stood = hand.status === "stood" || hand.status === "frozen"; const result = calculateScore(hand.numberCards, hand.modifiers, busted); + const preRoundTotal = getPlayerTotal(game, pid); + const projectedTotal = preRoundTotal + (busted ? 0 : result.total); // Find duplicate numbers for highlighting const numCounts = {}; @@ -287,8 +290,15 @@ export default function PlayRound() { {hand.status === "busted" && BUST} {isActive && ACTIVE} -
- {busted ? 0 : result.total} +
+
+ {busted ? 0 : result.total} +
+ {(preRoundTotal > 0 || projectedTotal > 0) && ( +
+ {preRoundTotal} → {projectedTotal} +
+ )}
diff --git a/src/components/PlayRound/PlayRound.module.css b/src/components/PlayRound/PlayRound.module.css index 78b80ad..7bd0af4 100644 --- a/src/components/PlayRound/PlayRound.module.css +++ b/src/components/PlayRound/PlayRound.module.css @@ -114,6 +114,10 @@ color: #0f1923; } +.scoreColumn { + text-align: right; +} + .playerScore { font-family: 'Fredoka', sans-serif; font-weight: 700; @@ -125,6 +129,16 @@ color: var(--accent2); } +.scoreTotals { + font-family: 'DM Sans', sans-serif; + font-size: 12px; + color: var(--text-dim); +} + +.arrow { + opacity: 0.6; +} + .cardRow { display: flex; gap: 6px; From 601a52ea49ca8372b319288599d5f0aba33a940a Mon Sep 17 00:00:00 2001 From: Lucas Howard <11452064+lchoward@users.noreply.github.com> Date: Thu, 19 Feb 2026 00:42:08 -0800 Subject: [PATCH 2/2] Always show score projection line Co-Authored-By: Claude Opus 4.6 --- src/components/PlayRound/PlayRound.jsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/PlayRound/PlayRound.jsx b/src/components/PlayRound/PlayRound.jsx index b7fe040..470f528 100644 --- a/src/components/PlayRound/PlayRound.jsx +++ b/src/components/PlayRound/PlayRound.jsx @@ -294,11 +294,9 @@ export default function PlayRound() {
{busted ? 0 : result.total}
- {(preRoundTotal > 0 || projectedTotal > 0) && ( -
- {preRoundTotal} → {projectedTotal} -
- )} +
+ {preRoundTotal} → {projectedTotal} +