Skip to content

JacinthaDev/Slot-Machine

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Avatar the Last Airbender Slot Machine

Avatar-slot-machine

Slot Machine

This is my Avatar the Last Airbender theme Slot Machine. Since Aang is the avatar, if you spin and all 3 reels show him, you win big!

Will you be lucky enough to spin 3 Avatars?

Link to project: https://slot-machine-aang.netlify.app

How It's Made:

Tech used: HTML, CSS, JavaScript

This slot machine starts you off with a bank of $1000. You can min bet ($5) or max bet ($50). However, my game isn't your traditional slot machine. Spin 3 Aangs - win 3x your current balance! Spin any 3 benders - 2x the winnings (Max betting can earn you 5x the winnings as a min bet)! Spin 3 Sokkas - you lose! You can also reset to start over.

Lessons Learned:

This was my first project working with so many JS functions at a time. It taught me that I must pseudocode so I know what's going on in my code. Something I forgot to do while I was coding was to make sure that there is a different winning multiplier depending on whether the user min betted or max betted. At first, I had the score calculating the same regardless of whether the user min or max bet. I was so deep into my code at that point and didn't know how to fix it without breaking my code so I duplicated my original turnReels function and made 2 of them so I could change the multiplier for the bets. I could have used less lines of code had I remembered to use different multipliers before I started coding.

Examples:

Take a look at similar projects!

Tic-Tac-Toe: https://github.com/JacinthaDev/Tic-Tac-Toe/tree/answer

NASA Picture of the Day Selector: https://github.com/JacinthaDev/simple-nasa-api

Simple To-Do List: https://github.com/JacinthaDev/Todo-list/tree/answer

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 66.6%
  • HTML 21.7%
  • CSS 11.7%