Fix backtracking bug

This commit is contained in:
2021-11-23 19:09:39 +00:00
parent 6e4b36fd82
commit a66ea1d922
6 changed files with 49 additions and 23 deletions
+3 -3
View File
@@ -169,13 +169,13 @@ gameRoomFromRoom rm = GameRoom
,p -.- 10 *.* unitVectorAtAngle a
]
unpos (UsedOutLink _ p a) = doubleShift p a
unpos (UsedInLink p a) = doubleShift p a
unpos (UsedInLink _ p a) = doubleShift p a
unpos _ = []
undir (UsedOutLink _ _ a) = Just $ 0.5*pi + a + snd (_rmShift rm)
undir (UsedInLink _ 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 (UsedInLink _ a:_) = a + snd (_rmShift rm)
getDir (UsedInLink _ _ a:_) = a + snd (_rmShift rm)
getDir (_:xs) = getDir xs
getDir _ = 0 -- fallback