about summary refs log tree commit diff
path: root/users/glittershark/xanthous/src/Xanthous/Generators/Village.hs
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-07-04T00·32-0400
committerglittershark <grfn@gws.fyi>2020-07-04T15·30+0000
commit9b8d3185fe6cee9231ed20a1dbf0240d0c459a39 (patch)
tree29b8f78a81500043df1fa8ca289bdb2a35dc68ff /users/glittershark/xanthous/src/Xanthous/Generators/Village.hs
parent4455f28e426f49c2e3b8ef08961e5073a11a5b4f (diff)
refactor(xan): Switch to V2 over tuples most places r/1207
These are generally rather nicer to work due to some typeclass instances,
and integrate better with other ecosystems for things like linear
algebra etc.

Change-Id: I546c8da7b17234648f3d612b28741c1fded25447
Reviewed-on: https://cl.tvl.fyi/c/depot/+/910
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'users/glittershark/xanthous/src/Xanthous/Generators/Village.hs')
-rw-r--r--users/glittershark/xanthous/src/Xanthous/Generators/Village.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/users/glittershark/xanthous/src/Xanthous/Generators/Village.hs b/users/glittershark/xanthous/src/Xanthous/Generators/Village.hs
index 614170d0c4f1..cc9c9d963f5c 100644
--- a/users/glittershark/xanthous/src/Xanthous/Generators/Village.hs
+++ b/users/glittershark/xanthous/src/Xanthous/Generators/Village.hs
@@ -73,9 +73,9 @@ fromCave' wallPositions = failing (pure ()) $ do
 
   where
     insertEntity e pt = modify $ EntityMap.insertAt (ptToPos pt) $ SomeEntity e
-    ptToPos pt = _Position # (pt & both %~ fromIntegral)
+    ptToPos pt = _Position # (fromIntegral <$> pt)
 
-    stepOut :: Set (Word, Word) -> [[(Word, Word)]] -> MaybeT m [[(Word, Word)]]
+    stepOut :: Set (V2 Word) -> [[V2 Word]] -> MaybeT m [[V2 Word]]
     stepOut circ rooms = for rooms $ \room ->
       let nextLevels = hashNub $ toList . neighborCells =<< room
       in pure