Skip to content

feat: Add Viva Las Vegas cat counter theme - #77

Merged
Remi Dyon (raemone) merged 1 commit into
microsoft:mainfrom
Dewain27:feature/viva-las-vegas-cat
Oct 23, 2026
Merged

Remi Dyon (raemone) merged 1 commit into
microsoft:mainfrom
Dewain27:feature/viva-las-vegas-cat

Conversation

@Dewain27

Copy link
Copy Markdown
Contributor

Summary

Adds a fourth theme to the count.html theme dropdown: Viva Las Vegas. A broke alley cat goes rags-to-riches into an Elvis-level high roller as feedback responses come in. Existing themes (Classic, Feed the Cat, Feed the Cat (German)) are unchanged.

Stages

0 10 25 50
Will Purr For Chips Penny slots Blackjack Roulette
75 100 130 (apex)
777 Jackpot High roller Elvis, the King of Vegas

Like the German theme, stage 130 is a visual apex only: it doesn't add a milestone, and the progress bar shows "🎤 The King of Vegas!" from 130 onward. Art was generated with Bing Image Creator (1:1, 1024×1024). Prompts are in scripts/vegas-cat-prompts.json.

Celebrations and sound

Level Every response Milestone
Chill Reel stop, coin ding, light shower of chips and bills Jackpot sound, 1 firework
Party Three-reel spin and win bell, glow, money and casino emoji walking across Jackpot sound, 3 fireworks
Chaos Full jackpot (bell and coin cascade), shake, about 150 chips and bills, high-roller emoji Jackpot sound, 6–8 fireworks
  • New confettiStyle: 'casino' draws poker chips and banknotes on the confetti canvas.
  • Slot machine sounds are generated in memory with the existing generateWav (no audio files). A theme's sounds map swaps the generic chime/fanfare/chaos/milestone sounds for its own.
  • Vegas messages, food-drop emoji, a neon background tint and a gold progress bar.

Refactor

THEME_CONTENT entries now carry their own viewId / counterId / catContainerId. That removes the cat-de ternaries in setTheme, updateCatState, celebrateCatMilestone, dropFood, the digit display, the counter sizing and the update pulse. Adding another theme is now mostly a data entry. All styling stays CSP-safe (class toggle, no inline scripts).

Testing

  • New tests/vegas-cat-theme.spec.mjs: theme switching and persistence, all 7 stages at boundary counts, counter and progress bar, image load and size, messages, food drops, sound swap, casino confetti.
  • german-cat-theme.spec.mjs: the dropdown expectation now includes cat-vegas.
  • 24/24 Playwright tests pass, including Classic, Feed the Cat and German regressions.
  • Walked through Chill, Party and Chaos with sound in a local nginx Docker container, including the 10 and 25 milestones and the 130 Elvis apex.

🤖 Generated with Claude Code

Adds a fourth counter theme, "Viva Las Vegas": a rags-to-riches arc where
a broke alley cat climbs to Elvis-level high roller as feedback comes in.

- 7 stages (0/10/25/50/75/100/130): Will Purr For Chips, penny slots,
  blackjack, roulette, 777 jackpot, high roller, and Elvis on a throne of
  cash. Art generated in Bing Image Creator; prompts in
  scripts/vegas-cat-prompts.json for reproducibility.
- Celebrations rain poker chips and banknotes (new 'casino' confetti
  style) with money/casino/high-roller emoji parades.
- Slot machine sounds generated in memory: coin ding per response (Chill),
  three-reel spin + win bell (Party), full jackpot with bell and coin
  cascade (Chaos and milestones).
- Vegas milestone and encouraging messages, neon background tint and a
  gold progress bar.

THEME_CONTENT entries now carry their own view/counter/cat-container ids
and optional sounds/confettiStyle, so setTheme, updateCatState, dropFood,
the digit display and the pulse no longer branch on 'cat-de'.

Tests: new tests/vegas-cat-theme.spec.mjs; dropdown expectation updated
for the fourth option. 24/24 Playwright tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Dewain27

Copy link
Copy Markdown
Contributor Author

Remi Dyon (@raemone) could you please review and approve this PR once it's done? After it merges, please verify that it pushes to prod.

@raemone
Remi Dyon (raemone) merged commit 24bf896 into microsoft:main Oct 23, 2026
6 checks passed
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.

2 participants