|
All right. I took a buddy's suggestion and just did iteration from bottom left to top right. Any point that's connected to a wall is deemed connected, and any point that's connected to a point deemed connected... is connected. Then an outside loop goes around that to work itself backwards, and bingo. It worked perfectly. I don't think recursion would have worked as well in this instance.
|