diff options
Diffstat (limited to 'divvy.c')
| -rw-r--r-- | divvy.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -212,7 +212,7 @@ * (This only works _because_ we've ensured the omino is simply * connected.) */ -static int addremcommon(int w, int h, int x, int y, int *own, int val) +static bool addremcommon(int w, int h, int x, int y, int *own, int val) { int neighbours[8]; int dir, count; @@ -239,8 +239,8 @@ static int addremcommon(int w, int h, int x, int y, int *own, int val) for (dir = 0; dir < 8; dir++) { int next = (dir + 1) & 7; - int gotthis = (neighbours[dir] == val); - int gotnext = (neighbours[next] == val); + bool gotthis = (neighbours[dir] == val); + bool gotnext = (neighbours[next] == val); if (gotthis != gotnext) count++; @@ -262,7 +262,8 @@ static int addremcommon(int w, int h, int x, int y, int *own, int val) */ static int *divvy_internal(int w, int h, int k, random_state *rs) { - int *order, *queue, *tmp, *own, *sizes, *addable, *removable, *retdsf; + int *order, *queue, *tmp, *own, *sizes, *addable, *retdsf; + bool *removable; int wh = w*h; int i, j, n, x, y, qhead, qtail; @@ -275,7 +276,7 @@ static int *divvy_internal(int w, int h, int k, random_state *rs) sizes = snewn(n, int); queue = snewn(n, int); addable = snewn(wh*4, int); - removable = snewn(wh, int); + removable = snewn(wh, bool); /* * Permute the grid squares into a random order, which will be |