From: Tim H. <ho...@wu...> - 2007-02-08 04:28:35
|
Hi David, I went through the code, and only found one obvious candidate for the empty igloo bug. The attached patch (generated against what I sent you last time) addresses that candidate; whether it fixes the bug is another story, of course. The bug is sufficiently rare that it will take some extensive testing to be certain. In case this doesn't work, also included in this (very small) patch is code that checks to see if we're in the extra life sequence but the penguin is still walking off. If this incongruity is detected, this patch prints the status and pauses the game. Might be a good time for a screenshot.This behavior is activated only if TUXMATH_DEBUG is defined. Of course, we could bandaid-over this problem and just have it reset the penguin's status to WALKING_ON whenever this incongruity is detected. I could accept that as a solution. But for now, I find myself preferring to see if I can figure out where it comes from (if this patch doesn't fix the problem anyway). Other issues: 1. I was playing the "Ace" arcade game, and I'd swear I received the problem -17 x ? = -22, with answer (when it zapped my igloo) 13. If the right hand side were -221, we'd be set. Might there be some character limit bug? I see MC_FORMULA_LEN is defined as 14, and the format string is "%d %c ? = %d", which by my reckoning leads to 14 characters---but I think snprintf needs an extra for the trailing \0. 2. Should we consider an option to disable the pause feature? My kids tend to hit pause when there's a problem coming that is especially challenging; that behavior might be OK in the "training academy" lessons but perhaps against the spirit of an arcade game, esp. if it keeps track of high scores. Thoughts? Best, --Tim |