Git Product home page Git Product logo

slot-machine-game's Introduction

Slot Machine Game

This is a simple command-line slot machine game written in JavaScript. The game allows players to deposit money, place bets on multiple lines, spin the slot machine, and win prizes based on the combination of symbols.

Prerequisites

Make sure you have the following installed on your machine:

Getting Started

  1. Clone the repository:

    git clone https://github.com/ikomi22/slot-machine-game.git
  2. Navigate to the project directory:

    cd slot-machine-game
  3. Install dependencies:

    npm install
  4. Run the game:

    node index.js

How to Play

  1. Deposit Money:

    • You will be prompted to enter the deposit amount.
    • Enter a positive number to deposit that amount of money.
  2. Select Number of Lines to Bet:

    • You will be prompted to enter the number of lines to bet on (1-3).
    • Enter a number between 1 and 3 to choose the number of lines.
  3. Place Bet per Line:

    • You will be prompted to enter the bet amount per line.
    • Enter a positive number that is within your balance and bet limits.
  4. Spin the Slot Machine:

    • The slot machine will generate random symbols for each reel.
    • The symbols will be displayed on the screen.
  5. Check if You Won:

    • The game will determine if you have won based on the combination of symbols on each line.
    • If all symbols on a line are the same, you win a prize based on the symbol's value.
  6. Collect Winnings:

    • If you win, the game will add your winnings to your balance.
    • If you lose, your balance will be reduced by the bet amount.
  7. Play Again:

    • After each round, you will be prompted to play again.
    • Enter 'Y' to play another round or any other key to exit the game.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

slot-machine-game's People

Contributors

ikomi22 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.