This is a project I started while I was learning JavaScript. It's a math game using HTML, CSS, and Vanilla JS! Feel free to check it out here.
There are multiple settings the user can choose to customize the game.
- Easy - two single-digit numbers
- Medium - one double-digit number and one single-digit number
- Hard - two double-digit numbers
The user can pick which operators to use:
- Addition
- Subtraction
- Multiplication
- Division
- Unlimited - Neverending equations
- 60 Second Fury - 60 second timer to add the pressure
The user can choose whether equations will include negative numbers.
If you'd like to play around with the code and build your own game, feel free to do so!
git clone https://github.com/melvincayas/math-whizard.git
I'm always open to improving my code and the best way to do that is by having others critique it. If you see any bugs or opportunities to refactor, please let me know. It would be highly appreciated!
-
Fork this repo
-
Create your branch for improvement
git checkout -b your-improvement
- Commit your changes
git commit -m "Refactored the code"
- Push to your branch
git push origin your-improvement
- Open a Pull Request
I started this project in March 2021 while taking a full-stack web developer course on Udemy. My goal was to see what I could do with JavaScript.
I revisited this project in June 2021 and I -
- Refactored the code
- Added error handling for empty inputs
- Modified the game layout
- Included the use of negative numbers
- Added sound, hover, and color effects for playfulness
If I were to expand on Math Whizard, I'd create a user database and let users keep track of their scores and compare with friends.
Melvin Cayas
cayasmj@gmail.com
melvincayas.com
Project Link
Live Version
GitHub