Skip to content

Latest commit

 

History

History
99 lines (66 loc) · 3.7 KB

README.md

File metadata and controls

99 lines (66 loc) · 3.7 KB

slotmachine

slot machine, byname one-armed bandit, known in Great Britain as a fruit machine, gambling device operated by dropping one or more coins or tokens into a slot and pulling a handle or pushing a button to activate one to three or more reels marked into horizontal segments by varying symbols


A simple slot machine game implemented in Python.


The Slot Machine project is a Python console game that emulates the thrill of playing a classic slot machine. It includes multiple lines betting, random symbol generation, and user-friendly interaction.

Features:

  • Multiple Lines Betting: Players can bet on multiple lines to enhance their winning chances.
  • Random Symbol Generation: The game ensures fair and unpredictable outcomes through random symbol generation.
  • Winning Combination Detection: It detects winning symbol combinations and calculates winnings.
  • User-Friendly Interface: With prompts and input validation, the game offers an intuitive user experience.

How to Play:

  1. Deposit Money: Begin by depositing an initial balance for betting.
  2. Place Bets: Choose the number of lines and set your bet amount per line.
  3. Spin the Reels: Spin the reels to reveal symbols and check for winning combinations.
  4. Check Winnings: The game calculates and displays winnings.
  5. Continue or Quit: Decide whether to keep playing or quit, with your remaining balance shown.

Customization: The game is highly customizable. Adjust parameters like bet limits, lines, and symbol values to suit your preferences.

Requirements: Python 3.x is required to run the Slot Machine game.

License: This open-source project is licensed under the MIT License, permitting modification and distribution.

Acknowledgments: Created for educational purposes, this project offers insights into Python programming, randomization, input validation, and basic game logic.


Table of Contents

Introduction

This is a console-based slot machine game written in Python. Players can deposit money, place bets on multiple lines, and spin the reels to try their luck. The game checks for winning combinations and calculates the winnings.

Features

  • Multiple lines betting
  • Random symbol generation
  • Winning combination detection
  • User-friendly input validation
  • Realistic console interface

Prerequisites

  • Python 3.x installed on your computer

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/your-username/slot-machine.git
  2. Change the directory to the cloned repository:

    cd slot-machine

How to Play

  1. Run the game by executing the main.py file:

    python main.py
  2. Deposit money when prompted, enter the number of lines to bet on, and set your bet amount per line.

  3. Watch the reels spin and see if you win!

  4. Press "q" to quit the game or simply hit Enter to continue playing.

  5. Your remaining balance will be displayed after quitting.

Note: You can adjust the game parameters such as MAX_LINES, MAX_BET, MIN_BET, ROWS, COLS, symbol_count, and symbol_value in the main.py file to customize the game to your liking.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Feel free to customize the README to include any additional information or instructions specific to your project. Don't forget to replace "your-username" in the installation steps with your actual GitHub username and update the license information if needed.