Monday, March 16, 2015

Week 9

Assignment 2 was due last week!
I find that, after these two assignments, comparing to the assignments I did in CSC108 last semester, the code is so much longer.
I have this problem where I feel like I'm doing something wrong after I've written about 10 lines of code and the function still doesn't work.
Which function proved me very wrong?
the function winner for the game Tippy.
That code for winner was so so so so so very long.
It was also very redundant. We had to check all around the squares of the most recent move, and the code was all very similar, just changing different directions each time.
What resulted was just lines and lines of basically the same code.

But speaking of labs, I was initially thrown off by the amount of code we had to write, because we had to change to what the back and front pointed to each time.
Later, I figured that we just always have to remember about the back and front of the LinkedList.
Every time we add a value somewhere in the list, we have to manually change the value that the back or front of the LinkedList points to.

Actually, some of the functions were kind of complicated, and there were no labs because of the strike, so I didn't get as much help with the labs as I usually do...
So... I shall just muddle through in my somewhat confused state for now...




No comments:

Post a Comment