The parse function for my grid returns {grid, {x_min,x_max,y_min,y_max}}
because when parsing you traverse the whole thing.
If you want your grid to have that {x_max,y_max}
coordinates and expect it to be correct then you will have to compute it whenever you put
in the grid. There is a decent amount of puzzles that require to expand the grid, or to take only a sub part of it like today.
So I would avoid counting on those struct fields to always be up to date.
Also another tip that I do all the time, I name min and max to “a” and “o” (alpha/omega), like xa
, xo
instead of x_min
, x_max
… just because the “x” in “max” makes it such a pain to mass rename or do multi-cursor stuff when editing