Mission Failed

So during this recent assignment (which hasn’t been a success for me yet), I partially reconfigured some of the skeleton code Dr. Delwiche gave us in class. One of the things that I figured out was that the init function seems to be missing a function call to the calorie-updating function. So this meant that my program would (if I am not mistaken) only run up till init and nothing more. So I nested my calorie-updating function call inside the init.

The other problem I experienced was my calorie tallying value. It just wouldn’t add. Even after i declared them correctly as integers, added a trace calories on my MouseEvent click functions, my calorie value would still remain as zero.

But the biggest concept that I really tried but couldn’t  understand is using the “for” statement to create a loop which will continue to check if total calories is exceeding 3000. I was also confused how to setup a “for” loop that would do this efficiently. Whenever I tested my animation with this loop, my animation would just jump straight to the end result page without me clicking any food items, which are attributed with individual calorie integer values.

Overall, I spent a total of two and a half hours on this assignment and really hope that I can resolve these issues by next class.

I am glad that we are finally learning how to incorporate sound.

Advertisements

About jonycfu

Hello! My name is Jon and I am currently a to-be Web Development Immersive student at General Assembly Hong Kong! I graduated with a double major in Business Marketing and Communications. In my spare time, I enjoy building computers, cooking, golfing, reading, and watching TV shows (e.g. Fringe, Breaking Bad, GoT, Sherlock, Parks and Rec, The Office, South Park, Futurama).
This entry was posted in Uncategorized. Bookmark the permalink.

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 )

Google+ photo

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

Connecting to %s