Skip to content

gperretta/slot-machine-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SLOT MACHINE - Javascript Project

Features:

  1. Allow the user to deposit money
  2. Determine number of lines the user wants to bet on
  3. Collect the user's bet amount
  4. Spin the slot machine
  5. Check if the user has won/lost
  6. Give the user their winnings
  7. Retry (if the user has any money left)

Example:

Enter a deposit amount: 50
Enter the number of lines to bet on (1-3): 3
Enter your bet: 10

RECAP
- Initial deposit: 50
- Number of lines to bet on: 3   
- Your bet: 10

Current deposit: 20

NOW LET'S SPIN!

*********
C | D | C
D | C | D
B | B | D
*********

You won $0

Current deposit: 20

Do you want to play again? (y/n)

About

A brief first exercise to learn javascript. (Link for project inspiration)

Topics

Resources

License

Stars

Watchers

Forks