In otherwords, if there's a line of secret doors with just one non-secret closed door among them and the non-secret door is opened, open up all the secret doors.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5744 c06c8d41-db1a-0410-9941-cceddc491573
X5DCNPFXJAWWTCTVQGZN4PTTWUJIUE4JPTXH3WVWCO2DW67MXWYAC
LVCBY444HPB4RRFMUAZPHVZ67IC3L6DB27AEMCW3DEXHLBF73TMQC
7Q7PY2DHSCW7Y663XJUTBFZTHXCF6KPIMZV2A6XORBCMMHIJWVGQC
MFONX2CQ4V7HA5NSD6P5NDDBXYDSKIOCYUKRZXJ4ZER2OKJWT2HQC
SVY2PTCLXR3KNPQAWXVXTTGCC5DR334HOAKHYO3VDDRWM2BWMALAC
JEWGBHOQGDSWMLT4FZTQWUKTBJJWY5CSRAQQUOWIZ7U4QBJ6ZLBQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
// Find all connected cells containing ft_min to ft_max, starting at d.
void find_connected_range(coord_def d, dungeon_feature_type ft_min,
dungeon_feature_type ft_max,
std::set<coord_def>& out)
{
if (grd[d.x][d.y] < ft_min || grd[d.x][d.y] > ft_max) return;
if (out.insert(d).second)
{
find_connected_range(coord_def(d.x+1, d.y), ft_min, ft_max, out);
find_connected_range(coord_def(d.x-1, d.y), ft_min, ft_max, out);
find_connected_range(coord_def(d.x, d.y+1), ft_min, ft_max, out);
find_connected_range(coord_def(d.x, d.y-1), ft_min, ft_max, out);
}
}