A better auto-shape algorithm could be made if 'inside' and 'outside' could be defined.
One possibility is to start with a position outside the entity as 'outside' and use a flood algorithm to define all adjacent blocks as outside.
The start position should optionally be given as argument to auto-shape entities with internal 'outside' spaces.
A better auto-shape algorithm could be made if 'inside' and 'outside' could be defined. One possibility is to start with a position outside the entity as 'outside' and use a flood algorithm to define all adjacent blocks as outside. The start position should optionally be given as argument to auto-shape entities with internal 'outside' spaces.