Day 21 – Catch the Type

Go to project: Catch the Type

Okay, so I can safely say I leveled up with this project. Pew. I am still surprised that I got through it. Of course I would never have even managed without the help of the amazing boyfriend. It’s actually been some days since we finished this project, but I haven’t had the energy to talk about it before now, haha! Still getting nervous twitches when thinking about it.

So this is another Jennifer Dewalt project. I didn’t do all the same functionalities that JD did. But the most important is there: catching the type aka. press some buttons to win a game.

As mentioned, I learned A LOT on this project:

  • I made an array with some symbols and letters (not all letters from the alphabet, mainly because, there are SO many and I felt lazy).
  • I made soooo many functions; I reused the getRandomInt function, an “addSymbol” function, a “startgame” function and a function that is called when a keyboard key is pressed. Man, I felt kinda overwhelmed, but I think that it will get easier with practice.
  • Each symbol being dropped had to have the same top position but random left positions, so we used the getRandomInt to do that job as well.
  • I used an if statement to determine whether the new symbol has been removed from the DOM. That’s because even though I used a .remove function it didn’t really remove it completely and that messed up the number of symbols on the page.
  • The correct/wrong/missed counter was actually not the worst/hardest to do. It was pretty simple.
  • I used a .fadeIn and .fadeOut function to make the startpage fade away and reveal the game. It was a fun little extra thing.
  • I learned so many new things, but I don’t know how to write about them to be honest. Maybe I will update this page later on.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s