/Python-Text-Based-Slot-Machine-

This Python project offers a command-line slot machine simulation where players deposit funds, bet on up to three lines, and spin to win. Featuring four symbols with varying values, the game calculates wins based on symbol matches across bet lines, multiplying bets by symbol values.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Python-Text-Based-Slot-Machine-💰

Screenshot 2024-03-26 at 2 35 14 PM
Screenshot 2024-03-26 at 2 09 38 PM

This Python-based project simulates a slot machine, offering an interactive command-line interface where users can deposit funds, choose the number of lines to bet on, place bets, and spin to win. It's designed to mimic the basic functionalities of a real slot machine, including betting mechanisms, symbol odds, and payout calculations.

Features

  • User Deposits: Users can start by depositing any amount of money they wish to play with.
  • Customizable Betting: Choose to bet on 1, 2, or 3 lines of the slot machine, offering strategic flexibility.
  • Dynamic Symbol Odds: Features four symbols (A, B, C, D) with different frequencies and values, influencing the game's odds and payouts.
  • Winning Mechanism: Wins are determined by matching symbols across the bet lines. A winning line multiplies the user's bet by the value of the matched symbol, adding to their balance.
  • Continuous Play: Users can continue to play until they decide to quit or run out of money.
  • Simple CLI Gameplay: Accessible via the command line interface, making it easy to start and play without a graphical interface.

System Requirements

  • Python: Ensure Python is installed on your system to run the game.

How to Play

  1. Start the Game: Navigate to the directory containing the script and run it.
  2. Deposit Funds: Input the amount of money you'd like to deposit into the slot machine.
  3. Select Lines: Choose the number of lines to bet on. Options include 1, 2, or 3 lines.
  4. Place Your Bet: Specify your bet amount for each selected line, adhering to the minimum and maximum bet limits.
  5. Spin and Win: The slot machine spins, randomly selecting symbols for each column. Wins are determined if symbols align across your bet lines.
  6. Repeat or Quit: Continue playing by spinning again or quit the game by entering the designated quit command.

Winning Calculation

  • Each symbol (A, B, C, D) has an associated value. Matching symbols across a bet line multiplies your bet by the symbol's value.
  • Symbol A: Value 5
  • Symbol B: Value 4
  • Symbol C: Value 3
  • Symbol D: Value 2