[gnome-games] Added debug info, changed the level & found why it was hanging in
- From: Jason Clinton <jclinton src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-games] Added debug info, changed the level & found why it was hanging in
- Date: Wed, 14 Oct 2009 02:48:44 +0000 (UTC)
commit 49a34ff367f211e41b098ef11eaa31eca87c4d99
Author: Guillaume Beland <guillaume beland gmail com>
Date: Tue Jun 23 19:22:40 2009 -0400
Added debug info, changed the level & found why it was hanging in
gnibbles_cworm_ai_wander()
It hang when reaching an off-board position (when traveling through "hole" in
walls), If the level is "closed" worm navigate nicely, even thought theyhave
funny behaviour sometimes.
gnibbles/main.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gnibbles/main.c b/gnibbles/main.c
index 8b1f385..99f80eb 100644
--- a/gnibbles/main.c
+++ b/gnibbles/main.c
@@ -1281,6 +1281,8 @@ move_worm_cb (ClutterTimeline *timeline, gint msecs, gpointer data)
gnibbles_cworm_add_actor (cworms[i]);
length = g_list_length (cworms[i]->list);
+ printf ("\nWorm ID: %d, Length: %d, xhead: %d, yhead:%d",
+ i, length, cworms[i]->xhead, cworms[i]->yhead);
//if there's only one actor in the list, just move the actor
if (length == 1) {
gnibbles_cworm_move_straight_worm (cworms[i]);
@@ -1374,7 +1376,7 @@ main (int argc, char **argv)
int i;
- level = gnibbles_level_new (1);
+ level = gnibbles_level_new (5);
gnibbles_board_load_level (board, level);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]