Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@theorytoe yes it would look like that and id_loc[x][y] == 0 means unoccupied
Interesting that you think the problem is this complicated to solve. Or I didn't explain clearly, or am misunderstanding your solution because it is too elegant for my grugdev brain.
"border" = " a line drawn on a grid edge. There is no requirement to do this in one drawing operation or anything like that. The end result is all that counts.
There's just two requirements: there must be a line around the area as a whole ( "draw a border around the data structure")
and
there must be a line on the grid edge between adjacent squares if they are neither siblings nor parent/child.
Like I said, I might be misunderstanding, but scanning an entire row or column and deriving some information from that is not necessary for this.
The fact that you think it's something more complicated makes me question if that was perhaps the issue for the AI as well