Skip to content

refactor(games): unify recent win/loss chip across games#62

Merged
netqo merged 1 commit into
devfrom
refactor/unify-winloss-chip
Jun 24, 2026
Merged

refactor(games): unify recent win/loss chip across games#62
netqo merged 1 commit into
devfrom
refactor/unify-winloss-chip

Conversation

@netqo

@netqo netqo commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

Unifies the recent win/loss indicator across the games so it looks the same
everywhere (except Roulette), matching Coinflip's lettered chip. Extracts a
shared WinLossChip and RecentResultsStrip and wires Coinflip, Mines, Crash
and Blackjack to them.

Rationale

The four games each had their own recent-results strip: Coinflip and Mines drew
a tinted, bordered chip with a W / L letter; Crash drew a plain solid square with
no label; Blackjack drew a solid-fill chip with a white W / L / P letter. They
were visually inconsistent for the same concept.

The new WinLossChip(tone: OutcomeTone) reuses the existing OutcomeTone
(Win / Loss / Push) enum and renders the Coinflip style; RecentResultsStrip
wraps the "Recent" header and the chip row. Each screen now maps its result list
to OutcomeTone and calls the shared strip, deleting its local
RecentStrip / RecentChip / HistoryChip. Net -30 lines.

Roulette is intentionally left untouched: its strip shows colored pocket numbers
(0-36), not a win/loss outcome, so the shared chip does not apply.

Verification

  • ./gradlew :app:compileDebugKotlin (green)
  • ./gradlew :app:ktlintMainSourceSetCheck (green)
  • ./gradlew :app:detekt (green)
  • ./gradlew :app:installDebug -- built and installed on a physical device.

On-device screenshots of the Crash/Blackjack strips are pending (the test device
was in active use); the chip is the same shared composable already shown working
on Coinflip.

Test plan

  • Compile + ktlint + detekt clean.
  • Visually confirm Coinflip / Mines / Crash / Blackjack recent strips render
    the identical W / L / P chip on device; confirm Roulette is unchanged.

Related issues

Checklist

  • Commit messages follow Conventional Commits.
  • Branch name follows the naming convention (refactor/).
  • The change is scoped: only the shared chip extraction and the four screens.
  • User-visible behavior changed (Crash/Blackjack chip restyle), so CHANGELOG.md is updated under [Unreleased].
  • No new dependency was added.

Extract a shared WinLossChip and RecentResultsStrip (the Coinflip
lettered W / L / P style, tone-driven via OutcomeTone) and use them in
Coinflip, Mines, Crash and Blackjack so the recent-results indicator
looks the same everywhere. This restyles Crash's plain colored squares
and Blackjack's solid chips to match Coinflip; each screen drops its
local RecentStrip / RecentChip / HistoryChip copy. Roulette is left as-is
(it shows colored pocket numbers, not win/loss).
@netqo netqo merged commit 78e0f00 into dev Jun 24, 2026
3 checks passed
@netqo netqo deleted the refactor/unify-winloss-chip branch June 24, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant