| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Game.LambdaHack.Common.Types
Description
Abstract identifiers for the main types in the engine. This is imported by modules that don't need to know the internal structure of the types. As a side effect, this prevents mutual dependencies among modules.
Documentation
A unique identifier of an item in the dungeon.
A unique identifier of a faction in a game. It's assigned in the order
from game mode roster, starting from one. We keep the FactionId
and TeamContinuity types separate mostly to let FactionId reflect
the order, which influences starting faction positions, etc.
We use TeamContinuity for dictionaries containing teams that may
or may not be active factions in the current game, while FactionId are
used only for factions in the game (in particular, because they vary
depending on order in game mode roster, while TeamContinuity are stable).
Instances
| Enum FactionId Source # | |
Defined in Game.LambdaHack.Common.Types Methods succ :: FactionId -> FactionId # pred :: FactionId -> FactionId # fromEnum :: FactionId -> Int # enumFrom :: FactionId -> [FactionId] # enumFromThen :: FactionId -> FactionId -> [FactionId] # enumFromTo :: FactionId -> FactionId -> [FactionId] # enumFromThenTo :: FactionId -> FactionId -> FactionId -> [FactionId] # | |
| Show FactionId Source # | |
| Binary FactionId Source # | |
| Eq FactionId Source # | |
| Ord FactionId Source # | |
| Hashable FactionId Source # | |
Defined in Game.LambdaHack.Common.Types | |
Abstract level identifiers.
Instances
| Enum LevelId Source # | |
| Show LevelId Source # | |
| Binary LevelId Source # | |
| Eq LevelId Source # | |
| Ord LevelId Source # | |
Defined in Game.LambdaHack.Common.Types | |
| Hashable LevelId Source # | |
Defined in Game.LambdaHack.Common.Types | |
A unique identifier of an actor in the dungeon.
Instances
| Enum ActorId Source # | |
| Show ActorId Source # | |
| Binary ActorId Source # | |
| Eq ActorId Source # | |
| Ord ActorId Source # | |
Defined in Game.LambdaHack.Common.Types | |
Item container type.
Constructors
| CFloor LevelId Point | |
| CEmbed LevelId Point | |
| CActor ActorId CStore | |
| CTrunk FactionId LevelId Point | for bootstrapping actor bodies |