Here’s my Guessing Game

Cecilia Song Avery
2 min readFeb 9, 2018

--

https://cilavery.github.io/GuessingGame/

I wrote the javascript and CSS to create this game. It’s pretty easy to win, especially if you use your hints wisely. When writing it I had to create a constructor function and add methods to the function’s .prototypes. I also learned some JQuery to link the HTML to the JS and that’s kind of like a fun game in itself.

I think the hardest part about this was trying to manipulate the CSS without it messing up the current state of the site. Another bootcamp student made a neat animation to coincide with the user’s guesses. In my attempt I tried changing the background based on user input to make the hints become more readable, but doing so would slightly shift elements around the page. So a side goal is to learn CSS (properly) so it doesn’t feel like I’m semi-randomly changing properties around to “see what happens”, and if I don’t like what’s happening then thinking, “well I guess we’re not going to do that design!” At least with javascript, you really can’t have errors. If I see an error or strange behavior, it must be fixed. But with CSS, sometimes my attitude is kind of like… “ah well, I guess we’ll just keep everything blue because it’s kind of annoying to figure out how to change everything to green…”.

Object oriented programming is also interesting to me as it really relates well to how I organize my thoughts in the real world. Another side goal is to learn the programming language Smalltalk because (1) Smalltalk is a dorky but awesome name for a computer language (2) It’s one of the best object oriented languages and (3) It’s an OG of programming languages and it’s not a “marketable” language to put on your resume. So I want to learn it for just pure fun.

So far I have been learning a lot through the foundations portion at Grace Hopper Academy. I have one last test to take that amounts to 70% of my grade before I can get to the full-time/on-campus episode of my journey. I feel calmly okay about it all!

--

--