about summary refs log tree commit diff
path: root/src/Xanthous/Generators.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xanthous/Generators.hs')
-rw-r--r--src/Xanthous/Generators.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Xanthous/Generators.hs b/src/Xanthous/Generators.hs
index 740b39c5f082..6e2e89d14a14 100644
--- a/src/Xanthous/Generators.hs
+++ b/src/Xanthous/Generators.hs
@@ -33,13 +33,13 @@ generate
   -> Params gen
   -> Dimensions
   -> g
-  -> UArray (Word, Word) Bool
+  -> Cells
 generate SCaveAutomata = CaveAutomata.generate
 
 data GeneratorInput where
   GeneratorInput :: forall gen. SGenerator gen -> Params gen -> GeneratorInput
 
-generateFromInput :: RandomGen g => GeneratorInput -> Dimensions -> g -> UArray (Word, Word) Bool
+generateFromInput :: RandomGen g => GeneratorInput -> Dimensions -> g -> Cells
 generateFromInput (GeneratorInput sg ps) = generate sg ps
 
 parseGeneratorInput :: Opt.Parser GeneratorInput
@@ -48,7 +48,7 @@ parseGeneratorInput = Opt.subparser $
                       (GeneratorInput <$> pure SCaveAutomata <*> CaveAutomata.parseParams)
                       (Opt.progDesc "cellular-automata based cave generator"))
 
-showCells :: UArray (Word, Word) Bool -> Text
+showCells :: Cells -> Text
 showCells arr =
   let ((minX, minY), (maxX, maxY)) = bounds arr
       showCellVal True = "x"
@@ -58,7 +58,7 @@ showCells arr =
       rows = row <$> [minY..maxY]
   in intercalate "\n" rows
 
-cellsToWalls :: UArray (Word, Word) Bool -> EntityMap Wall
+cellsToWalls :: Cells -> EntityMap Wall
 cellsToWalls cells = foldl' maybeInsertWall mempty . assocs $ cells
   where
     maybeInsertWall em (pos@(x, y), True)