GiveItemEffect
NNF = No New Failures.
Distractions
Could Bookworm Adventures (from Pop-Cap) be any more addictive? The last two times I've sat down to code, I've found myself fighting ancient greek villains instead. Fortunately, I've got good notes from my last session, so I can start right in.
Create Stage Pass Item
I feel like this should be easy. Let's see. Creating test, done. Creating setup function to pass test. Done. Now snapshotting debug text. Done. Test passes.
I note along the way that my other objects use the Canonical Items collection. I'll need to fix that later.
Implement Give Item effect
Ok, let's create a "compare to snapshot" test for the Give_Stage_Pass effect. Pretty easy copy/paste three lines of code. Test fails as expected Good. Note that this test only checks to make sure the object talks the talk. I need another test to prove that it walks the walk.
test GiveStagePass Effect
Ok, so I've written testGiveHomerStagePass and it's failing. Now to implement it so that it passes. Ah, hmm... Here one part of my design collides with another. One the one hand, the effect only knows about the itemID (not the item object). But, the Character wants to get an actual item object (not just the ID). I'll have to consider how to resolve this.
More next time.
Distractions
Could Bookworm Adventures (from Pop-Cap) be any more addictive? The last two times I've sat down to code, I've found myself fighting ancient greek villains instead. Fortunately, I've got good notes from my last session, so I can start right in.
Create Stage Pass Item
I feel like this should be easy. Let's see. Creating test, done. Creating setup function to pass test. Done. Now snapshotting debug text. Done. Test passes.
I note along the way that my other objects use the Canonical Items collection. I'll need to fix that later.
Implement Give Item effect
Ok, let's create a "compare to snapshot" test for the Give_Stage_Pass effect. Pretty easy copy/paste three lines of code. Test fails as expected Good. Note that this test only checks to make sure the object talks the talk. I need another test to prove that it walks the walk.
test GiveStagePass Effect
Ok, so I've written testGiveHomerStagePass and it's failing. Now to implement it so that it passes. Ah, hmm... Here one part of my design collides with another. One the one hand, the effect only knows about the itemID (not the item object). But, the Character wants to get an actual item object (not just the ID). I'll have to consider how to resolve this.
More next time.
0 Comments:
Post a Comment
<< Home