KNXKO / JSLearnProject

Simple slot machine game implemented in Node.js. The game allows players to deposit money, choose the number of lines to bet on, place their bets, spin the slot machine, check if they've won, and play again.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slot Machine Game

This is a simple slot machine game implemented in Node.js. The game allows players to deposit money, choose the number of lines to bet on, place their bets, spin the slot machine, check if they've won, and play again.

How to Play

  1. Clone the repository to your local machine.
  2. Navigate to the project directory.
  3. Run npm install to install dependencies.
  4. Run node index.js to start the game.
  5. Follow the prompts to play the game.

Gameplay

The game follows these steps:

  1. Deposit some money.
  2. Determine the number of lines to bet on (1-3).
  3. Collect the bet amount per line.
  4. Spin the slot machine.
  5. Check if you've won.
  6. Give the user the money they've won.
  7. Ask the user if they want to play again.

Symbol Values and Probabilities

The slot machine contains the following symbols with their corresponding values and probabilities of appearing:

  • πŸ’ Cherry: Value 5, Probability 10%
  • 🍊 Orange: Value 4, Probability 20%
  • πŸ‹ Lemon: Value 3, Probability 30%
  • πŸ‡ Grape: Value 2, Probability 40%

Technologies Used

  • Node.js
  • Prompt-sync (for command-line input)

Tutorial Video

About

Simple slot machine game implemented in Node.js. The game allows players to deposit money, choose the number of lines to bet on, place their bets, spin the slot machine, check if they've won, and play again.


Languages

Language:JavaScript 100.0%