diplomacy-0.1.0.0: The board game Diplomacy, spoken in Haskell

Copyright(c) Alexander Vieth, 2015
LicenseBSD3
Maintaineraovieth@gmail.com
Stabilityexperimental
Portabilitynon-portable (GHC only)
Safe HaskellNone
LanguageHaskell2010

Diplomacy.Game

Description

 

Synopsis

Documentation

data Game round roundStatus where Source

Constructors

TypicalGame :: TypicalRound round -> Status roundStatus -> Turn -> Map Zone (Aligned Unit, RoundOrderConstructor roundStatus Typical) -> Control -> Game round roundStatus 
RetreatGame :: RetreatRound round -> Status roundStatus -> Turn -> Resolution Typical -> Map Zone (Aligned Unit, RoundOrderConstructor roundStatus Retreat) -> Occupation -> Control -> Game round roundStatus 
AdjustGame :: AdjustRound round -> Status roundStatus -> Turn -> Map Zone (Aligned Unit, RoundOrderConstructor roundStatus Adjust) -> Control -> Game round roundStatus 

Instances

data Status roundStatus where Source

Instances

data AdjustRound round where Source

Instances

Show (AdjustRound round) 

gameOccupation :: Game round roundStatus -> Occupation Source

gameControl :: Game round roundStatus -> Control Source

gameTurn :: Game round roundStatus -> Turn Source

gameRound :: Game round roundStatus -> Round Source

gameSeason :: Game round roundStatus -> Season Source

issueOrders :: forall round. Map Zone (Aligned Unit, SomeOrderObject (RoundPhase round)) -> Game round RoundUnresolved -> (ValidateOrdersOutput (RoundPhase round), Game round RoundUnresolved) Source

The game given as the second component of the return value will differ from the input game only if all orders are valid. NB for adjust phase we wipe all build orders; that's because there's no way to explicitly remove a build order by overwriting it with some other order.

showGame :: Game round roundStatus -> String Source