A 3Γ3 terminal slot machine written in pure Python β no external dependencies.
- Volatility presets:
low,med,high(changes reel weights) - Wilds (
W) substitute and 2Γ the line payout when present - Bonus (
*): 3 anywhere triggers 3 free spins @ 2Γ, with retrigger (+1 spin) - Selectable paylines: 3 / 5 / 8 (rows, +diagonals, +verticals)
- Gamble double-or-nothing feature on wins
- Autospin and persistent profile (
slot_profile.json) with lifetime stats - Clean ASCII board with subtle ANSI colors (works in most terminals)
python Python_Slot_Machine_Pro.pyControls
s= single spina= autospin (choose spin count)d= depositt= show payout tableq= quit
Youβll also choose volatility and paylines (3/5/8), then bet per line (1β100).
- Session is saved to
slot_profile.jsonautomatically on exit. - Bonus free spins evaluate all 8 paylines at a 2Γ multiplier for excitement.
- Wilds multiply only the line(s) they appear on.
+---+---+---+
| C | W | C |
+---+---+---+
| B | * | B |
+---+---+---+
| A | C | A |
+---+---+---+
Line 1 win: $8
Spin won: $8
Gamble win? (y/n):
- Jan 2025: Initial prototype built locally (basic 3Γ3 reels, payouts)
- Mar 2025: Added volatility presets, wilds/bonus, paylines, autospin, persistence
- Aug 18, 2025: Cleaned up and published to GitHub (first public release)
- Reels/Grid: 3Γ3 grid; reels are sampled from a weighted symbol pool (volatility changes weights)
- Paylines: Choose 3/5/8 (rows; +diagonals; +verticals). A line pays if all three match, wilds
Wsubstitute - Wilds:
Wsubstitutes and 2Γ the payout for that line - Bonus:
*does not pay on lines; 3 anywhere triggers 3 free spins @ 2Γ (retrigger +1) - Gamble: Optional double-or-nothing on each win
- Persistence: Balance + lifetime stats saved to
slot_profile.json
- Configurable payouts/weights via
config.json - Session analytics (hit rate, RTP estimate after N spins)
--no-colorflag for dumb terminals; unit tests for payline logic
.
βββ Python_Slot_Machine_Pro.py # main script
βββ README.md # this file
βββ .gitignore # Python ignores
βββ LICENSE # MIT
MIT Β© 2025 Yashvi Shah