Working room generation with less shifting, should be more sensible
This commit is contained in:
+3
-3
@@ -33,7 +33,7 @@ generateLevelFromRoomList gr' w
|
||||
. placeWires
|
||||
. doPartialPlacements
|
||||
. doExtendedPlacements
|
||||
. flip (mapAccumR doRoomPlacements) rs
|
||||
. flip (mapAccumR doRoomPlacements) rs'
|
||||
$ w { _walls = wallsFromRooms rs
|
||||
, _floorTiles = floorsFromRooms rs
|
||||
, _gameRooms = gameRoomsFromRooms rs
|
||||
@@ -43,9 +43,9 @@ generateLevelFromRoomList gr' w
|
||||
where
|
||||
path = pairsToGraph dist pairPath
|
||||
pairPath = concatMap _rmPath rs
|
||||
rs = zipWith addTile zs gr
|
||||
zs = map fromIntegral $ randomRs (0,63::Int) $ _randGen w
|
||||
gr = map doRoomShift gr'
|
||||
rs = map doRoomShift rs'
|
||||
rs' = zipWith addTile zs gr'
|
||||
|
||||
placeWires :: (World,[Room])-> World
|
||||
placeWires (w,rms) = foldr placeRoomWires w rms
|
||||
|
||||
Reference in New Issue
Block a user