Thursday, January 28, 2016

Day 19: Late Night, Come Home

As for work today, the stalactite still eludes me. Such mysteries of physics interaction! It's like I have to disable physics once the stalactite hits the ground. Luckily, the event of being caught under the stalactite successfully constantly pushes the main character out of the way. The tricky part of that one was creating an extra array to remove pieces of an array during iteration. During the process, one can only inspect (not change) parts of a container, so an extra container containing the to-be-removed pieces needed to be taken out.

As for programming work today, the stack cometh! Fortunately, the stack was only an adaptor. In that case, the vector was more than suitable to fit a stack's needs. As for unnecessary implementation, that always comes with a cost for using a complex container to mimic a simple one. Luckily, it's not too much, dealing with the already simple implementation of a vector.

What's next? Hashmaps!

No comments:

Post a Comment