Define room link datatypes
This commit is contained in:
+5
-5
@@ -168,14 +168,14 @@ gameRoomFromRoom rm = GameRoom
|
||||
[p +.+ 10 *.* unitVectorAtAngle a
|
||||
,p -.- 10 *.* unitVectorAtAngle a
|
||||
]
|
||||
unpos (OutLink _ p a) = doubleShift p a
|
||||
unpos (InLink p a) = doubleShift p a
|
||||
unpos (UsedOutLink _ p a) = doubleShift p a
|
||||
unpos (UsedInLink p a) = doubleShift p a
|
||||
unpos _ = []
|
||||
undir (OutLink _ _ a) = Just $ 0.5*pi + a + snd (_rmShift rm)
|
||||
undir (InLink _ a) = Just $ 0.5*pi + a + snd (_rmShift rm)
|
||||
undir (UsedOutLink _ _ a) = Just $ 0.5*pi + a + snd (_rmShift rm)
|
||||
undir (UsedInLink _ a) = Just $ 0.5*pi + a + snd (_rmShift rm)
|
||||
undir _ = Nothing
|
||||
closePoints x y = roundPoint2 x == roundPoint2 y
|
||||
getDir (InLink _ a:_) = a + snd (_rmShift rm)
|
||||
getDir (UsedInLink _ a:_) = a + snd (_rmShift rm)
|
||||
getDir (_:xs) = getDir xs
|
||||
getDir _ = 0 -- fallback
|
||||
|
||||
|
||||
Reference in New Issue
Block a user