Commit before making out and in placements have ids

This commit is contained in:
2022-03-11 12:34:19 +00:00
parent 73a35bb3f1
commit 219e4e15ee
13 changed files with 166 additions and 179 deletions
+3 -2
View File
@@ -142,7 +142,8 @@ doExtendedPlacements :: GenWorld -> ( IM.IntMap [Placement], GenWorld)
doExtendedPlacements w = let ((pmnts,gw),rms) = mapAccumR doExtendedPlacement (IM.empty,w) (_gRooms w)
in (pmnts,gw{_gRooms = rms})
doExtendedPlacement :: (IM.IntMap [Placement], GenWorld) -> Room
doExtendedPlacement :: (IM.IntMap [Placement], GenWorld)
-> Room
-> ( (IM.IntMap [Placement], GenWorld) , Room )
doExtendedPlacement (im,w) rm = case _rmExtPmnt rm of
Nothing -> ( (im,w) , rm )
@@ -227,7 +228,7 @@ gameRoomFromRoom rm = GameRoom
UsedInLink{} -> ma
_ -> Nothing
where
ma = Just $ 0.5*pi + (_rpDir rp) + snd (_rmShift rm)
ma = Just $ 0.5*pi + _rpDir rp + snd (_rmShift rm)
closePoints x y = roundPoint2 x == roundPoint2 y
getDir (rp:xs) = case _rpLinkStatus rp of
UsedInLink {} -> _rpDir rp + snd (_rmShift rm)