So, first off: I finished another user story! Within a single day too. Believe it or not, I’ve had a rather bad track record in that department.
While on the livestream, I managed to finish the version number user story. This means that the next release will have a version number in the top-left corner.
This is helpful mainly to developers and testers. If something is acting strangely, you have a way to make sure you are using the latest version. It also helps with tracking bugs, since you can pin them down to an exact build of the game.
I finished the feature in the expected amount of time. Very unexpected, and I was quite happy about it!
Grabbing… Not Quite as Good
I worked on one other user story today: Grabbing. Unlike the version number, this one will require more work. This is mainly because I ran into a problem while writing the acceptance tests for it.
Mockolate apparently calls the constructor for each class you mock, but provides null arguments. This is usually fine… Unless you try to use one of those arguments in the constructor. That is exactly what happened while I was coding grabbing.
At first I didn’t even know it was a problem with the mocks. I’ve mentioned this before, but trying to debug a problem within a step definition while using Cuke4AS3 is very difficult. I had to gradually comment the relevant code blocks before I could even figure out which source file and line was causing the error.
This particular problem happened with two classes. The first was the Synchronization class which I created. To make things easier, I simply moved the offending calls into the initialization method.
The other was the Character class. Its constructor was creating a Spritemap using the art asset supplied by an argument. FlashPunk did not take kindly to being given a null graphic, and complained. To fix this problem, I decided to simply use the full Character class and not bother trying to create a mock for it.