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.
- Clone the repository to your local machine.
- Navigate to the project directory.
- Run
npm install
to install dependencies. - Run
node index.js
to start the game. - Follow the prompts to play the game.
The game follows these steps:
- Deposit some money.
- Determine the number of lines to bet on (1-3).
- Collect the bet amount per line.
- Spin the slot machine.
- Check if you've won.
- Give the user the money they've won.
- Ask the user if they want to play again.
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%
- Node.js
- Prompt-sync (for command-line input)