aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2023-07-06 18:20:37 +0100
committerSimon Tatham <anakin@pobox.com>2023-07-07 18:17:02 +0100
commit23d4322fec38f8ffac930bc541e08309e1d02f11 (patch)
tree0181697c3b4f53c1ded0dd4d98236f206ee97bb0
parente6cdd70df867f064b0358dc3dba56d2667ab80a5 (diff)
downloadpuzzles-23d4322fec38f8ffac930bc541e08309e1d02f11.zip
puzzles-23d4322fec38f8ffac930bc541e08309e1d02f11.tar.gz
puzzles-23d4322fec38f8ffac930bc541e08309e1d02f11.tar.bz2
puzzles-23d4322fec38f8ffac930bc541e08309e1d02f11.tar.xz
grid.c: add dot coordinates to debugging dumps.
I wanted these in order to try to check whether all the faces of a grid were being traversed in the right orientation. That turned out not to be the cause of my problem, but it's still useful information to put in diagnostics.
-rw-r--r--grid.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/grid.c b/grid.c
index 228da91..2b21103 100644
--- a/grid.c
+++ b/grid.c
@@ -264,6 +264,10 @@ static void grid_debug_basic(grid *g)
#ifdef DEBUG_GRID
int i;
printf("--- Basic Grid Data ---\n");
+ for (i = 0; i < g->num_dots; i++) {
+ grid_dot *d = g->dots[i];
+ printf("Dot %d at (%d,%d)\n", i, d->x, d->y);
+ }
for (i = 0; i < g->num_faces; i++) {
grid_face *f = g->faces[i];
printf("Face %d: dots[", i);