Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module providing the API using the data from Roads
Also contains some hardcoded data, which - contrary to Roads
-
is not generated.
Synopsis
- chooseTeamSpots :: Map Team Coord
- deckForEncounter :: Model -> Team -> Nat -> [ID]
- data Encounter
- fightSpots :: Map Team [(Coord, Kind)]
- journeys :: Map Team [[Encounter]]
- lootNextToFight :: Coord -> Maybe Coord
- lootSpots :: Map Coord Nat
- class Network b where
- mkTopology :: [(Nat, Nat)] -> Topology
- rewards :: Map Team [Rewards]
- data Rewards = Rewards Nat [ID]
- data Topology
Documentation
chooseTeamSpots :: Map Team Coord #
The position where to choose the team
Possible encounters on the world map
Fight Team Kind | Fighting |
Reward Nat | Picking up rewards. The Nat indicates the number of rewards. |
Select Team | Choosing your team at the start of the game |
Instances
Eq Encounter # | |
Show Encounter # | |
Generic Encounter # | |
type Rep Encounter # | |
Defined in Network
type Rep Encounter = D1 (MetaData "Encounter" "Network" "main" False) (C1 (MetaCons "Fight" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Team) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Kind)) :+: (C1 (MetaCons "Reward" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Nat)) :+: C1 (MetaCons "Select" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Team)))) |
journeys :: Map Team [[Encounter]] #
Journeys of playable teams, for testing. This data could be generated automatically, this is tracked in https://github.com/smelc/miso-darkcraw/issues/13
lootNextToFight :: Coord -> Maybe Coord #
The high-level API to query data from Roads
mkTopology :: [(Nat, Nat)] -> Topology #
How to obtain the API from data in Roads
Rewards after a game. First Nat
is the number of rewards to pick.
Second list is all available rewards.
Instances
Eq Rewards # | |
Show Rewards # | |
Generic Rewards # | |
type Rep Rewards # | |
Defined in Network
type Rep Rewards = D1 (MetaData "Rewards" "Network" "main" False) (C1 (MetaCons "Rewards" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Nat) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ID]))) |