LambdaHack-0.11.0.1: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe Haskell | None
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.

Synopsis

- data ItemId
- data FactionId
- data LevelId
- data ActorId
- data Container
  - = CFloor LevelId Point
  - | CEmbed LevelId Point
  - | CActor ActorId CStore
  - | CTrunk FactionId LevelId Point

# Documentation

data ItemId Source #

A unique identifier of an item in the dungeon.

#### Instances

Instances details

Binary ItemId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods put :: ItemId -> Put Source # get :: Get ItemId Source # putList :: [ItemId] -> Put Source #
Enum ItemId Source # |

Instance details

Defined in Game.LambdaHack.Common.Types

Methods

succ :: ItemId -> ItemId Source #

pred :: ItemId -> ItemId Source #

toEnum :: Int -> ItemId Source #

fromEnum :: ItemId -> Int Source #

enumFrom :: ItemId -> [ItemId] Source #

enumFromThen :: ItemId -> ItemId -> [ItemId] Source #

enumFromTo :: ItemId -> ItemId -> [ItemId] Source #

enumFromThenTo :: ItemId -> ItemId -> ItemId -> [ItemId] Source #

Show ItemId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods showsPrec :: Int -> ItemId -> ShowS Source # show :: ItemId -> String Source # showList :: [ItemId] -> ShowS Source #
Eq ItemId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods (==) :: ItemId -> ItemId -> Bool Source # (/=) :: ItemId -> ItemId -> Bool Source #
Ord ItemId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods compare :: ItemId -> ItemId -> Ordering Source # (<) :: ItemId -> ItemId -> Bool Source # (<=) :: ItemId -> ItemId -> Bool Source # (>) :: ItemId -> ItemId -> Bool Source # (>=) :: ItemId -> ItemId -> Bool Source # max :: ItemId -> ItemId -> ItemId Source # min :: ItemId -> ItemId -> ItemId Source #

data FactionId Source #

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

Instances details

Binary FactionId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods put :: FactionId -> Put Source # get :: Get FactionId Source # putList :: [FactionId] -> Put Source #
Enum FactionId Source # |

Instance details

Defined in Game.LambdaHack.Common.Types

Methods

succ :: FactionId -> FactionId Source #

pred :: FactionId -> FactionId Source #

toEnum :: Int -> FactionId Source #

fromEnum :: FactionId -> Int Source #

enumFrom :: FactionId -> [FactionId] Source #

enumFromThen :: FactionId -> FactionId -> [FactionId] Source #

enumFromTo :: FactionId -> FactionId -> [FactionId] Source #

enumFromThenTo :: FactionId -> FactionId -> FactionId -> [FactionId] Source #

Show FactionId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods showsPrec :: Int -> FactionId -> ShowS Source # show :: FactionId -> String Source # showList :: [FactionId] -> ShowS Source #
Eq FactionId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods (==) :: FactionId -> FactionId -> Bool Source # (/=) :: FactionId -> FactionId -> Bool Source #
Ord FactionId Source # |

Instance details

Defined in Game.LambdaHack.Common.Types

Methods

compare :: FactionId -> FactionId -> Ordering Source #

(<) :: FactionId -> FactionId -> Bool Source #

(<=) :: FactionId -> FactionId -> Bool Source #

(>) :: FactionId -> FactionId -> Bool Source #

(>=) :: FactionId -> FactionId -> Bool Source #

max :: FactionId -> FactionId -> FactionId Source #

min :: FactionId -> FactionId -> FactionId Source #

Hashable FactionId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods hashWithSalt :: Int -> FactionId -> Int Source # hash :: FactionId -> Int Source #

data LevelId Source #

Abstract level identifiers.

#### Instances

Instances details

Binary LevelId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods put :: LevelId -> Put Source # get :: Get LevelId Source # putList :: [LevelId] -> Put Source #
Enum LevelId Source # |

Instance details

Defined in Game.LambdaHack.Common.Types

Methods

succ :: LevelId -> LevelId Source #

pred :: LevelId -> LevelId Source #

toEnum :: Int -> LevelId Source #

fromEnum :: LevelId -> Int Source #

enumFrom :: LevelId -> [LevelId] Source #

enumFromThen :: LevelId -> LevelId -> [LevelId] Source #

enumFromTo :: LevelId -> LevelId -> [LevelId] Source #

enumFromThenTo :: LevelId -> LevelId -> LevelId -> [LevelId] Source #

Show LevelId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods showsPrec :: Int -> LevelId -> ShowS Source # show :: LevelId -> String Source # showList :: [LevelId] -> ShowS Source #
Eq LevelId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods (==) :: LevelId -> LevelId -> Bool Source # (/=) :: LevelId -> LevelId -> Bool Source #
Ord LevelId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods compare :: LevelId -> LevelId -> Ordering Source # (<) :: LevelId -> LevelId -> Bool Source # (<=) :: LevelId -> LevelId -> Bool Source # (>) :: LevelId -> LevelId -> Bool Source # (>=) :: LevelId -> LevelId -> Bool Source # max :: LevelId -> LevelId -> LevelId Source # min :: LevelId -> LevelId -> LevelId Source #
Hashable LevelId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods hashWithSalt :: Int -> LevelId -> Int Source # hash :: LevelId -> Int Source #

data ActorId Source #

A unique identifier of an actor in the dungeon.

#### Instances

Instances details

Binary ActorId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods put :: ActorId -> Put Source # get :: Get ActorId Source # putList :: [ActorId] -> Put Source #
Enum ActorId Source # |

Instance details

Defined in Game.LambdaHack.Common.Types

Methods

succ :: ActorId -> ActorId Source #

pred :: ActorId -> ActorId Source #

toEnum :: Int -> ActorId Source #

fromEnum :: ActorId -> Int Source #

enumFrom :: ActorId -> [ActorId] Source #

enumFromThen :: ActorId -> ActorId -> [ActorId] Source #

enumFromTo :: ActorId -> ActorId -> [ActorId] Source #

enumFromThenTo :: ActorId -> ActorId -> ActorId -> [ActorId] Source #

Show ActorId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods showsPrec :: Int -> ActorId -> ShowS Source # show :: ActorId -> String Source # showList :: [ActorId] -> ShowS Source #
Eq ActorId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods (==) :: ActorId -> ActorId -> Bool Source # (/=) :: ActorId -> ActorId -> Bool Source #
Ord ActorId Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods compare :: ActorId -> ActorId -> Ordering Source # (<) :: ActorId -> ActorId -> Bool Source # (<=) :: ActorId -> ActorId -> Bool Source # (>) :: ActorId -> ActorId -> Bool Source # (>=) :: ActorId -> ActorId -> Bool Source # max :: ActorId -> ActorId -> ActorId Source # min :: ActorId -> ActorId -> ActorId Source #

data Container Source #

Item container type.

Constructors

CFloor LevelId Point |
CEmbed LevelId Point |
CActor ActorId CStore |
CTrunk FactionId LevelId Point | for bootstrapping actor bodies

#### Instances

Instances details

Binary Container Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods put :: Container -> Put Source # get :: Get Container Source # putList :: [Container] -> Put Source #
Generic Container Source # |

Instance details

Defined in Game.LambdaHack.Common.Types

Associated Types

type Rep Container |

Instance details

Defined in Game.LambdaHack.Common.Types

type Rep Container = D1 ('MetaData "Container" "Game.LambdaHack.Common.Types" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) ((C1 ('MetaCons "CFloor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LevelId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Point)) :+: C1 ('MetaCons "CEmbed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LevelId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Point))) :+: (C1 ('MetaCons "CActor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ActorId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CStore)) :+: C1 ('MetaCons "CTrunk" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FactionId) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LevelId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Point)))))

Methods

from :: Container -> Rep Container x Source #

to :: Rep Container x -> Container Source #

Show Container Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods showsPrec :: Int -> Container -> ShowS Source # show :: Container -> String Source # showList :: [Container] -> ShowS Source #
Eq Container Source # |
Instance details Defined in Game.LambdaHack.Common.Types Methods (==) :: Container -> Container -> Bool Source # (/=) :: Container -> Container -> Bool Source #
Ord Container Source # |

Instance details

Defined in Game.LambdaHack.Common.Types

Methods

compare :: Container -> Container -> Ordering Source #

(<) :: Container -> Container -> Bool Source #

(<=) :: Container -> Container -> Bool Source #

(>) :: Container -> Container -> Bool Source #

(>=) :: Container -> Container -> Bool Source #

max :: Container -> Container -> Container Source #

min :: Container -> Container -> Container Source #

type Rep Container Source # |

Instance details

Defined in Game.LambdaHack.Common.Types

type Rep Container = D1 ('MetaData "Container" "Game.LambdaHack.Common.Types" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) ((C1 ('MetaCons "CFloor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LevelId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Point)) :+: C1 ('MetaCons "CEmbed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LevelId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Point))) :+: (C1 ('MetaCons "CActor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ActorId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CStore)) :+: C1 ('MetaCons "CTrunk" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FactionId) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LevelId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Point)))))