about summary refs log tree commit diff
path: root/users/glittershark/xanthous/src/Xanthous/Generators.hs
diff options
context:
space:
mode:
Diffstat (limited to 'users/glittershark/xanthous/src/Xanthous/Generators.hs')
-rw-r--r--users/glittershark/xanthous/src/Xanthous/Generators.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/users/glittershark/xanthous/src/Xanthous/Generators.hs b/users/glittershark/xanthous/src/Xanthous/Generators.hs
index 2801137b699c..ef37070b6ede 100644
--- a/users/glittershark/xanthous/src/Xanthous/Generators.hs
+++ b/users/glittershark/xanthous/src/Xanthous/Generators.hs
@@ -39,6 +39,7 @@ import           Xanthous.Entities.Environment
 import           Xanthous.Entities.Item (Item)
 import           Xanthous.Entities.Creature (Creature)
 import           Xanthous.Game.State (SomeEntity(..))
+import           Linear.V2
 --------------------------------------------------------------------------------
 
 data Generator
@@ -91,18 +92,18 @@ parseGeneratorInput = Opt.subparser
 
 showCells :: Cells -> Text
 showCells arr =
-  let ((minX, minY), (maxX, maxY)) = bounds arr
+  let (V2 minX minY, V2 maxX maxY) = bounds arr
       showCellVal True = "x"
       showCellVal False = " "
       showCell = showCellVal . (arr !)
-      row r = foldMap (showCell . (, r)) [minX..maxX]
+      row r = foldMap (showCell . (`V2` r)) [minX..maxX]
       rows = row <$> [minY..maxY]
   in intercalate "\n" rows
 
 cellsToWalls :: Cells -> EntityMap Wall
 cellsToWalls cells = foldl' maybeInsertWall mempty . assocs $ cells
   where
-    maybeInsertWall em (pos@(x, y), True)
+    maybeInsertWall em (pos@(V2 x y), True)
       | not (surroundedOnAllSides pos) =
         let x' = fromIntegral x
             y' = fromIntegral y