Safe Haskell | None |
---|
The game arena comprised of levels. No operation in this module
involves the State
, COps
, Config
or Action
type.
- 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 identifier
Level ids are, for now, ordered linearly by depth.
levelNumber :: LevelId -> IntSource
Depth of a level.
levelDefault :: Int -> LevelIdSource
Default level for a given depth.
Dungeon
The complete dungeon is a map from level names to levels.
fromList :: [(LevelId, Level)] -> Int -> DungeonSource
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.