X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=array.c;fp=array.c;h=c70c5707a08a295a5ed600f43073bfdaadd52e18;hb=cfaa794b19d81130959062a0806ea2e95f31f44d;hp=469be38b088c646e5b266806c80a40b491747e3c;hpb=1911ba70546693467850012c0a124955ea5e5922;p=max%2Fgol.git diff --git a/array.c b/array.c index 469be38..c70c570 100644 --- a/array.c +++ b/array.c @@ -38,5 +38,17 @@ int gol_vivify(struct gol_board *const state, int_least32_t x, int_least32_t y) state->live_cells[state->n + 1] = y; state->n += 2; + + if (x > state->max_x) { + state->max_x = x; + } else if (x < state->min_x) { + state->min_x = x; + } + + if (y > state->max_y) { + state->max_y = y; + } else if (y < state->min_y) { + state->min_y = y; + } return 1; }