Friday, August 03, 2007

Give Lisa a Stage Pass

Last step
 Make Homer play the Ukulele to the stage manager, and confirm that he gets the stage pass. Actually, on second thought, Homer probably isn't smart enough to play the Ukulele successfully. I'll have Lisa do it instead (although Homer would make a good test).

NPC.ShowAbility
 Implementing it now (the test fails already). Actually, thanks to my previous work (FindResponseByItemOrAbility), it's pretty straightforward.
 Ok, now it appears that the NPC isn't set up to respond to the Ukelele playing. I'll fix that in the NPC creation script. Done. Let's see what happens now. Ah, a few syntax errors. Easily fixed... Ah yes, order dependancy in my setup script. There's got to be a good solution to that, I'm sure I'll stumble across it later.
 My current test is trying to do to many things at once. I'll start smaller, with a debugPrint test for the StageManager.
 Ok, now I can see clearly that the second script line isn't being added. Now to find out why. Ah! When I check for duplicates, I don't compare the ability. Changing that now. Excellent, now that DebugPrint looks like what I expect.

DebugPrint tests
 Okay, it's past time to fix the snapshot comparison test problem. My plan is to write the output to a text file and use that text file for comparison. I can start with the second. First step - create a directory to hold the files.
 Naturally, I'll write a test function for this. Ah, first bug= handling double quotes. Another syntax error. Fixed, and the test passes. Unfortunately, the test data is an HTML header, so it doesn't show up. Fixing that now... That took distressingly long, but it's over now.
 Next step, of course, is writing the data to these files. Ah. Wrote a bunch of code, and now I get a permission denied error. Hrm... Looks like it's back to the drawing board. I'll need to store these snapshots in the database instead.

testCreateReactionToUkelelePlaying
 Ok, let's get this test passing (finally! It's been weeks), and then I'm off to make chicken soup. Excellent. All tests pass.

0 Comments:

Post a Comment

<< Home