View Single Post
Old May 6th, 2006, 6:35 PM   #3
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,890
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
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.
Sane is offline   Reply With Quote