Skip to content

Add Octocat Slots — a GitHub-themed slot machine app#100

Open
darostegui wants to merge 2 commits into
badger:mainfrom
darostegui:add-octoslots
Open

Add Octocat Slots — a GitHub-themed slot machine app#100
darostegui wants to merge 2 commits into
badger:mainfrom
darostegui:add-octoslots

Conversation

@darostegui

Copy link
Copy Markdown

Octocat Slots 🎰

A GitHub-themed three-reel slot machine for the Universe badge. Pull the lever,
match symbols, chase the jackpot, and keep your credit balance climbing.

Octocat Slots spinning to a jackpot with confetti

Casino theme (default) Jackpot! GitHub theme
Casino idle Jackpot GitHub theme

What it does

  • Three-reel slot machine with animated spin, gold cabinet, and a Vegas bulb rail
  • Two swappable reel themes sharing one payout table:
    • Casino (default): 7, BAR, cherry, GitHub, bell, lemon
    • GitHub: octocat, RKO'27, star, merge, fork, GitHub mark
  • Weighted outcomes tuned like a real machine: ~4% jackpot / ~16% pair / ~80% loss
  • Persistent credits + best-win high score
  • Confetti celebration on a win

Controls

Button Action
B or A Spin (costs 1 credit)
UP / DOWN Raise / lower bet (while idle)
C Refill credits when you hit zero
A + B + C (held) Toggle reel theme — see Easter egg

Configuration — conf.py

Option Value Effect
RKO 0 Classic casino reels (default)
RKO 1 GitHub-themed reels
WIN 1 Boosted payouts — credits trend up over a long session (default)
WIN 0 Original, tighter payouts

Both themes share the same six-symbol payout table, so switching themes changes
only the artwork, never the odds.

Easter egg 🥚

Hold A + B + C together during play to flip between the casino and GitHub
reel themes instantly. The choice is written back to conf.py, so it sticks
next launch.

Structure

Standard app layout — __init__.py, 24×24 icon.png, assets/ (two 192×32
sprite sheets), plus a conf.py and README.md. No changes to the menu or any
other app.

Testing

  • ✅ Tested in the simulator (python simulator/badge_simulator.py -C badge badge/apps/octoslots)
  • ✅ Tested on a real Tufty 2350 badge (spin, betting, refill, theme toggle, config)
  • ✅ Native 160×120 screenshots included (see screenshots/)

Art is original or derived from GitHub's own marks; the casino symbols are
generic slot iconography (no third-party game trademarks).

Three-reel slot machine with two swappable reel themes (classic casino and
GitHub/RKO'27), weighted odds (~4% jackpot / ~16% pair / ~80% loss),
persistent credits and high score, and a confetti win celebration.

Controls: B/A spin, UP/DOWN bet, C refill credits, A+B+C toggle theme.
Config via conf.py: RKO selects the reel theme, WIN selects the payout table.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 1, 2026 05:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “Octocat Slots” app to the Universe badge app suite, implementing a three-reel slot machine with two swappable visual themes and persistent credit/high-score tracking.

Changes:

  • Introduces the Octocat Slots game implementation (rendering, spin logic, payouts, persistence, and theme toggle).
  • Adds an app-level configuration file (conf.py) to select reel theme and payout tuning.
  • Adds an in-app README describing controls, payouts, configuration, and included files.
Show a summary per file
File Description
badge/apps/octoslots/init.py New slot machine app logic, UI rendering, persistence, and theme toggle behavior.
badge/apps/octoslots/conf.py New configuration defaults for reel theme and payout mode.
badge/apps/octoslots/README.md Documentation for gameplay controls, payout behavior, and configuration.

Review details

  • Files reviewed: 3/11 changed files
  • Comments generated: 3
  • Review effort level: Low

Comment thread badge/apps/octoslots/__init__.py Outdated
Comment thread badge/apps/octoslots/__init__.py Outdated
Comment thread badge/apps/octoslots/__init__.py Outdated
- Refill credits on C only (matches the 'Press C for credits' messaging,
  controls table, and PR docs) instead of any A/B/C press
- Update the out-of-credits hint to 'PRESS C TO REFILL' to match
- Fix the RKO=1 docstring symbol list to include RKO'27

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@darostegui

Copy link
Copy Markdown
Author

Thanks @copilot-pull-request-reviewer — addressed all three in 9fa8b49:

  1. Refill on C only_handle_idle_input now refills solely on BUTTON_C, matching the "Press C for credits" messaging, the controls table, and the PR description (A/B no longer refill).
  2. Hint aligned — the out-of-credits hint now reads PRESS C TO REFILL instead of A/B/C REFILL.
  3. Docstring fixed — the RKO = 1 symbol list now includes RKO'27 to match THEMES[1]["names"].

Verified in the simulator: A/B do nothing when out of credits, C refills to 10.

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