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.
Make sure you have the following installed on your machine:
- Node.js (https://nodejs.org)
-
Clone the repository:
git clone https://github.com/ikomi22/slot-machine-game.git
-
Navigate to the project directory:
cd slot-machine-game
-
Install dependencies:
npm install
-
Run the game:
node index.js
-
Deposit Money:
- You will be prompted to enter the deposit amount.
- Enter a positive number to deposit that amount of money.
-
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.
-
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.
-
Spin the Slot Machine:
- The slot machine will generate random symbols for each reel.
- The symbols will be displayed on the screen.
-
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.
-
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.
-
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.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.