A simple command-line slot machine simulator that provides an entertaining gambling experience with random symbol generation and payout logic.
- 🎲 Random symbol generation for three reels
- 💰 Dynamic payout system based on symbol matching
- 🎨 Animated spin effect
- 📊 Balance tracking system
- 🎯 Interactive betting mechanism
- 📋 Comprehensive paytable display
The game features 7 different symbols with varying payout multipliers:
- 🍒 Cherry: 2x multiplier
- 🍋 Lemon: 3x multiplier
- 🍊 Orange: 4x multiplier
- 🍇 Grape: 5x multiplier
- 💎 Diamond: 10x multiplier
- 7️⃣ Lucky Seven: 20x multiplier
- ⭐ Star: 50x multiplier
- Run the script:
python mini_slot_machine.py - Starting balance is $100
- Enter your bet amount (must be between $1 and your current balance)
- Watch the reels spin!
- Win conditions:
- Three matching symbols: Win bet × symbol multiplier
- Two matching symbols: Get your bet back
- No match: Lose your bet
- Python 3.x
- No external libraries required (uses only built-in modules)
git clone <repository-url>
cd #1000_Mini_Slot_Machine
python mini_slot_machine.py- You start with $100
- Minimum bet: $1
- Maximum bet: Your current balance
- Game continues until you run out of money or choose to quit
- Two matching symbols return your bet amount
- Three matching symbols multiply your bet by the symbol's value
🎰 MINI SLOT MACHINE 🎰
Current Balance: $100
Enter bet amount (1-100): $10
Spinning...
┌─────┬─────┬─────┐
│ 🍒 │ 🍒 │ 🍒 │
└─────┴─────┴─────┘
🎉 WINNER! You won $20!
New Balance: $110
SlotMachineclass: Main game logicdisplay_header(): Shows game title and balancespin_reels(): Generates random symbolsanimate_spin(): Creates spinning animationcalculate_payout(): Determines winningsdisplay_result(): Shows spin resultsdisplay_paytable(): Shows payout informationget_bet(): Handles user input for bettingplay_round(): Manages a single game roundplay(): Main game loop
This project is part of the 100 Lines of Python Code challenge. Feel free to fork and improve!
Implements: sumanth-0#1000
This project is open source and available under the MIT License.