The game arena comprised of levels. No operation in this module
- data LevelId
- levelNumber :: LevelId -> Int
- levelDefault :: Int -> LevelId
- data Dungeon
- fromList :: [(LevelId, Level)] -> Int -> Dungeon
- currentFirst :: LevelId -> Dungeon -> [(LevelId, Level)]
- adjust :: (Level -> Level) -> LevelId -> Dungeon -> Dungeon
- mapDungeon :: (Level -> Level) -> Dungeon -> Dungeon
- (!) :: Dungeon -> LevelId -> Level
- lookup :: LevelId -> Dungeon -> Maybe Level
- depth :: Dungeon -> Int
Level ids are, for now, ordered linearly by depth.
The complete dungeon is a map from level names to levels.
Create a dungeon from a list of levels and maximum depth. The depth is only a danger indicator; there may potentially be multiple levels with the same depth.
Association list corresponding to the dungeon. Starts at the supplied level id (usually the current level) to try to speed up the searches and keep the dungeon lazy.