GNOME Bugzilla – Bug 763062
Don't materialize worm unless there are N open spaces in front of it
Last modified: 2018-05-22 12:21:24 UTC
<mcatanzaro> it would be cool for the ghost worm to stick around for longer after a respawn; I died eight times in a row the other day because my spawn point was blocked off by yellow worm, but there was enough space (one or two spaces) between me and yellow that the ghost worm materialized anyway :(
Created attachment 323027 [details] [review] Don't materialize worm unless there are N open spaces in front of it
Created attachment 323028 [details] [review] Don't materialize worm unless there are N open spaces in front of it
Review of attachment 323028 [details] [review]: ::: src/worm.vala @@ +313,3 @@ + || board[pos_x, pos_y] != NibblesGame.EMPTYCHAR) + { + rounds_dematerialized += 1; rounds_dematerialized++; But actually, I think you should only return here without incrementing rounds_dematerialized, because the early return skips the code that decrements rounds_dematerialized, so you're going to get twice the intended amount of "dematerialization," right?
Isn't the same case as above [0]? If I'm returning early from the function, that means the worm is not materializing this turn so I have to increment the rounds_dematerialized counter. It's possible that I misunderstood how it works. I didn't test this thoroughly. Razvan, can you have a look? https://git.gnome.org/browse/gnome-nibbles/tree/src/worm.vala#n271
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-nibbles/issues/7.