This was an assignment for the advanced prep work for Viking Code School. The first portion involved a series of basic algorithm problems to be solved using JavaScript and displayed in an HTML page. These files are labeled index.html and scripts.js
A separate project is included here for the same assignment, which involved creating a simple Roulette game where the player starts with a bankroll of $1,000 and is able to choose an amount to bet and a type of bet from the following options:
- single number 00, 0-36 (payout 35:1)
- even, odd, 1-18, or 19-36 (payout 1:1)
- 1st 12, 2nd 12, or 3rd 12 (payout 2:1)
The game users JavaScript prompts rather than an HTML interface. Aside from the main game prompts, the game also asks the user if they would like to continue playing after each spin and prohibits a user from playing further if their bankroll drops to zero. See in code comments for further.
The roulette game is accessed through a plain roulette.html page that simply runs the roulette.js file.
View the html page for the algorithms here: http://js-algs-roulette.surge.sh/
Play the roulette game here: http://js-algs-roulette.surge.sh/roulette.html