Move to using RoomLink datatype

This commit is contained in:
2021-11-23 20:45:39 +00:00
parent a66ea1d922
commit 1f2d767d5e
18 changed files with 160 additions and 122 deletions
+5 -4
View File
@@ -2,6 +2,7 @@
module Dodge.Room.Door
where
import Geometry
import Dodge.RoomLink
import Dodge.Data
import Dodge.Default.Room
import Dodge.Placement.Instance
@@ -23,8 +24,8 @@ door = defaultRoom
-- note no bounds
}
where
lnks = [(V2 20 35,0)
,(V2 20 5,pi)
lnks = [uncurry outLink (V2 20 35,0)
,uncurry inLink (V2 20 5,pi)
]
switchDoorRoom :: Room
@@ -38,8 +39,8 @@ switchDoorRoom = defaultRoom
-- note no bounds
}
where
lnks = [(V2 20 35,0)
,(V2 20 5,pi)
lnks = [uncurry outLink (V2 20 35,0)
,uncurry inLink(V2 20 5,pi)
]
f (pmnt:_) = putDoubleDoor False red (cond pmnt) (V2 0 20) (V2 40 20) 2
f _ = error "tried to put a door using an empty placement list"