about summary refs log tree commit diff
path: root/src/Xanthous/Generators/CaveAutomata.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xanthous/Generators/CaveAutomata.hs')
-rw-r--r--src/Xanthous/Generators/CaveAutomata.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Xanthous/Generators/CaveAutomata.hs b/src/Xanthous/Generators/CaveAutomata.hs
index f1123abbd8f4..e885f4ed1aad 100644
--- a/src/Xanthous/Generators/CaveAutomata.hs
+++ b/src/Xanthous/Generators/CaveAutomata.hs
@@ -98,10 +98,10 @@ generate' params dims = do
   let steps' = params ^. steps
   when (steps' > 0)
    $ for_ [0 .. pred steps'] . const $ stepAutomata cells dims params
-  lift $ fillOuterEdgesM cells
   -- Remove all but the largest contiguous region of unfilled space
   (_: smallerRegions) <- lift $ regions @UArray . amap not <$> freeze cells
   lift $ fillAllM (fold smallerRegions) cells
+  lift $ fillOuterEdgesM cells
   pure cells
 
 stepAutomata :: forall s g. MCells s -> Dimensions -> Params -> CellM g s ()