JS + HTML Games
These are 3 possible games to make to practice using HTML and JS. They are listed easiest to hardest. Feel free to work on whichever one(s) are a good challenge for you. There’s not much instruction – it’s up to you to decide how the site will look and the details of how it works. Be creative!
General guidelines for projects:
- Use GitHub Pages to serve the games. You can follow these instructions to deploy your code.
- Include a README with a demo, and instructions for how to run the code
Games
Coin Flip
Make a web page where you can flip a coin and it comes up heads 50% of times and tails 50% of times.
Extensions:
- Add a box where the user can say how many coins they want to flip. Then display that many coins and flip them all randomly.
Guess My Number
Make a web page that generates a secret random number and the user can guess the number until they get it right. For each guess, the game should display whether the answer is higher, lower, or correct.
Extensions:
- Track how many wrong guesses the user has made so far and display that count
- Track what numbers the user has already guessed and display those
- Let the user choose the range of the secret number
Boggle
Make a web page with Boggle
Boggle Extension
- Add a timer so that each person can only take a certain amount of time for a turn
- Advanced: Write a function that can solve the boggle game - find all the valid words using a dictionary