Inspiration

The inspiration behind this game was to build a project I knew I could make functional within the time limit and also still have ways to scale the difficulty by adding additional features. Also, I enjoy making projects that I can play with and have fun with!

What it does

This project builds off a simple premise - guess a number that the computer picked by adding in different difficulty modes, an increasing range of numbers as the round increases, and responsive feedback that tells the user whether or not their guess is higher or lower than the target number.

How I built it

I used vanilla HTML, CSS, and JavaScript to build this game. On a time constraint, I was more comfortable using vanilla front-end languages rather than a framework, and I knew I could have better control over the code.

Challenges I ran into

I originally planned to work with a teammate to incorporate a back-end component of user registration that would allow users to create an account and it would automatically record their scores to their account. Issues were faced with connecting the backend to the SQL database so we decided to submit separately. Front-end wise, there were challenges with passing in imported variables properly, and controlling scope when referencing variables. In particular, the round and number of tries properly updating every time a player made a guess.

Accomplishments that I'm proud of

I am proud that I was able to complete almost everything I wanted to do. I am also proud of how I used ES6 modules to keep my code cleaner and how I provided documentation to help make my code easier to read. I also am proud of how the game looks, as I was inspired by Harvard colors.

What I learned

I learned how its very important to plan ahead and ensure that you have an overhead view of the project. When adding in additional features later on, it is more difficult to incorporate those features if you do not keep track of which functions need to keep track of which variables.

What's next for Number Guess Game

I would like to add to it so two people could compete and play back to back.

Share this project:

Updates