After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 763062 - Don't materialize worm unless there are N open spaces in front of it
Don't materialize worm unless there are N open spaces in front of it
Status: RESOLVED OBSOLETE
Product: gnome-nibbles
Classification: Applications
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: gnome-nibbles-maint
gnome-nibbles-maint
Depends on:
Blocks:
 
 
Reported: 2016-03-03 21:28 UTC by Iulian Radu
Modified: 2018-05-22 12:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't materialize worm unless there are N open spaces in front of it (1.83 KB, patch)
2016-03-03 21:28 UTC, Iulian Radu
none Details | Review
Don't materialize worm unless there are N open spaces in front of it (2.01 KB, patch)
2016-03-03 21:38 UTC, Iulian Radu
reviewed Details | Review

Description Iulian Radu 2016-03-03 21:28:54 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 :(
Comment 1 Iulian Radu 2016-03-03 21:28:58 UTC
Created attachment 323027 [details] [review]
Don't materialize worm unless there are N open spaces in front of it
Comment 2 Iulian Radu 2016-03-03 21:38:26 UTC
Created attachment 323028 [details] [review]
Don't materialize worm unless there are N open spaces in front of it
Comment 3 Michael Catanzaro 2016-03-04 00:15:30 UTC
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?
Comment 4 Iulian Radu 2016-03-04 18:22:42 UTC
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
Comment 5 GNOME Infrastructure Team 2018-05-22 12:21:24 UTC
-- 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.