app

Safe Haskell None
Language Haskell2010

Network

Description

Module providing the API using the data from Roads Also contains some hardcoded data, which - contrary to Roads - is not generated.

Synopsis

Documentation

chooseTeamSpots :: Map Team Coord #

The position where to choose the team

data Encounter #

Possible encounters on the world map

Constructors

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

fightSpots :: Map Team [(Coord, Kind)] #

The position of fights, hardcoded yes

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

lootSpots :: Map Coord Nat #

Map from coordinates to the number of loots at this position

class Network b where #

The high-level API to query data from Roads

Methods

neighbors :: b -> Coord -> [Coord] #

Instances
Network Topology #  
Instance details

Defined in Network

Methods

neighbors :: Topology -> Coord -> [Coord] #

mkTopology :: [(Nat, Nat)] -> Topology #

How to obtain the API from data in Roads

data Rewards #

Rewards after a game. First Nat is the number of rewards to pick. Second list is all available rewards.

Constructors

Rewards Nat [ID]  
Instances
Eq Rewards #  
Instance details

Defined in Network

Methods

(==) :: Rewards -> Rewards -> Bool #

(/=) :: Rewards -> Rewards -> Bool #

Show Rewards #  
Instance details

Defined in Network

Methods

showsPrec :: Int -> Rewards -> ShowS #

show :: Rewards -> String #

showList :: [Rewards] -> ShowS #

Generic Rewards #  
Instance details

Defined in Network

Associated Types

type Rep Rewards :: Type -> Type #

Methods

from :: Rewards -> Rep Rewards x #

to :: Rep Rewards x -> Rewards #

type Rep Rewards #  
Instance details

Defined in Network

data Topology #

Instances
Network Topology #  
Instance details

Defined in Network

Methods

neighbors :: Topology -> Coord -> [Coord] #