diplomacy- Diplomacy board game

Copyright(c) Alexander Vieth 2015
Portabilitynon-portable (GHC only)
Safe HaskellNone






data Game round roundStatus where Source #


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 

data Status roundStatus where Source #

data AdjustRound round where Source #


Show (AdjustRound round) Source # 


showsPrec :: Int -> AdjustRound round -> ShowS #

show :: AdjustRound round -> String #

showList :: [AdjustRound round] -> ShowS #

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 for every great power with at least one order appearing in the input order set; that's because there's no way to explicitly remove a build order by overwriting it with some other order. This is due to the way we represent build orders: they are in the game map alongside a unit which doesn't really exist yet. Removing this order involves removing that entry in the map.

showGame :: Game round roundStatus -> String Source #