I've looked around for an algorithm to solve this problem, but I can't seem to find anything.
In a game I am working on, data is held in a grid. Certain squares within that grid can be set as walls, so that the user can create buildings. What I am wondering is how could I write an algorithm to determine which parts of the grid were indoors, that is to say, within a building, and which parts are outdoors. Thank you in advance for any advice.