mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 15:41:30 -07:00
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.
This commit is contained in:
4
grid.c
4
grid.c
@ -264,6 +264,10 @@ static void grid_debug_basic(grid *g)
|
|||||||
#ifdef DEBUG_GRID
|
#ifdef DEBUG_GRID
|
||||||
int i;
|
int i;
|
||||||
printf("--- Basic Grid Data ---\n");
|
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++) {
|
for (i = 0; i < g->num_faces; i++) {
|
||||||
grid_face *f = g->faces[i];
|
grid_face *f = g->faces[i];
|
||||||
printf("Face %d: dots[", i);
|
printf("Face %d: dots[", i);
|
||||||
|
Reference in New Issue
Block a user