[gnome-games/gnibbles-clutter] Added debug info, changed the level & found why it was hanging in
- From: Guillaume Béland <guillaubel src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games/gnibbles-clutter] Added debug info, changed the level & found why it was hanging in
- Date: Tue, 23 Jun 2009 23:33:21 +0000 (UTC)
commit 04eed658514b010176269d1eee32e632051b7f04
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 bbb056a..7be050e 100644
--- a/gnibbles/main.c
+++ b/gnibbles/main.c
@@ -1274,6 +1274,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]);
@@ -1365,7 +1367,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]