GNOME Bugzilla – Bug 619988
Unexpected death
Last modified: 2014-07-18 23:53:03 UTC
From: https://bugs.launchpad.net/ubuntu/+source/gnome-games/+bug/574212: While playing nibbles you sometimes die for no apparent reason. Sometimes when this happens, you get stuck in a loop where you respawn and die again after moving 3 spaces ( and not crashing into anything ) until you are out of lives. The respawn loop can be broken if you press any key to change direction after you respawn but before you die again. The unexpected death can be triggered by you or one of the computer worms eating something.
Created attachment 166056 [details] [review] gnibbles patch for reverse bug in worm.c Patch from Felix Oxley (see Launchpad bug): "Hi, I had this problem often, so I had a look at it this week - here is a patch. :-) The problem was that when an AI worm ate a diamond, which reverses all other players, the calculation to determine which direction you were now moving in was incorrect. If your worm was moving in a straight line (imagine a short worm with no kinks) say right, then the direction assigned after reversing would also be right and the new head/old tail would run in to the body of the worm. The correction is a very straightforward, hopefully it can be merged quickly."
Hey Felix. Thanks a lot for the patch :) And thank you Philip for forwarding it to the right place. Ideally bugs/patches like this should just go to gnome bugzilla directly. It would save us all a lot of work (and I would also not have found your nice clarification of the patch after I had already reviewed it). I only went to lp afterwards to look for your email to give proper credit in the commit. I did not find your email so I'll just commit it now and put your name in the comment. If you plan to send more patches please consider sending them to bugzilla directly as git formatted patches. It will save me a lot of trouble and probably also get your work committed faster... :) Thanks again. Committed to master: http://git.gnome.org/browse/gnome-games/commit/?id=c99525beee74d22c7ebf4d8daa0a70ed1197cd89
Hmmmm this looks familiar
*** Bug 654072 has been marked as a duplicate of this bug. ***
Just kidding. Maybe I should read bug reports before deciding they're duplicates.