Move to using RoomLink datatype
This commit is contained in:
@@ -2,11 +2,12 @@ module Dodge.Room.CheckConsistency
|
||||
where
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.Graph
|
||||
import Dodge.RoomLink
|
||||
|
||||
linksOnPath :: Room -> Bool
|
||||
linksOnPath r = all pointOnPath linkPoints
|
||||
where
|
||||
linkPoints = map fst $ _rmOutLinks r ++ _rmInLinks r
|
||||
linkPoints = map (fst . lnkPosDir) $ _rmOutLinks r ++ _rmInLinks r
|
||||
pointOnPath p = elem p $ concatMap flat2 $ _rmPath r
|
||||
flat2 (x,y) = [x,y]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user