app

Safe Haskell None
Language Haskell2010

Campaign

Description

This module deals with the succession of matches |

Synopsis

Documentation

newtype Journey #

For every level, the opponent and the theme. Maps of this type are complete: the domain is the entire of Level

Constructors

Journey (Map Level (Team, Theme))  
Instances
Eq Journey #  
Instance details

Defined in Campaign

Methods

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

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

Show Journey #  
Instance details

Defined in Campaign

Methods

showsPrec :: Int -> Journey -> ShowS #

show :: Journey -> String #

showList :: [Journey] -> ShowS #

Generic Journey #  
Instance details

Defined in Campaign

Associated Types

type Rep Journey :: Type -> Type #

Methods

from :: Journey -> Rep Journey x #

to :: Rep Journey x -> Journey #

type Rep Journey #  
Instance details

Defined in Campaign

data Level #

The levels: Level0 is the first level (no reward was given yet), Level1 is the second level; etc.

Constructors

Level0  
Level1  
Instances
Bounded Level #  
Instance details

Defined in Campaign

Methods

minBound :: Level #

maxBound :: Level #

Enum Level #  
Instance details

Defined in Campaign

Eq Level #  
Instance details

Defined in Campaign

Methods

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

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

Ord Level #  
Instance details

Defined in Campaign

Methods

compare :: Level -> Level -> Ordering #

(<) :: Level -> Level -> Bool #

(<=) :: Level -> Level -> Bool #

(>) :: Level -> Level -> Bool #

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

max :: Level -> Level -> Level #

min :: Level -> Level -> Level #

Show Level #  
Instance details

Defined in Campaign

Methods

showsPrec :: Int -> Level -> ShowS #

show :: Level -> String #

showList :: [Level] -> ShowS #

Generic Level #  
Instance details

Defined in Campaign

Associated Types

type Rep Level :: Type -> Type #

Methods

from :: Level -> Rep Level x #

to :: Rep Level x -> Level #

type Rep Level #  
Instance details

Defined in Campaign

type Rep Level = D1 (MetaData "Level" "Campaign" "main" False) (C1 (MetaCons "Level0" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Level1" PrefixI False) (U1 :: Type -> Type))

data Outcome #

The outcome of playing a single game

Constructors

Win

Player wins

Draw

Draw

Loss

Player loses

Instances
Bounded Outcome #  
Instance details

Defined in Campaign

Enum Outcome #  
Instance details

Defined in Campaign

Show Outcome #  
Instance details

Defined in Campaign

Methods

showsPrec :: Int -> Outcome -> ShowS #

show :: Outcome -> String #

showList :: [Outcome] -> ShowS #

Generic Outcome #  
Instance details

Defined in Campaign

Associated Types

type Rep Outcome :: Type -> Type #

Methods

from :: Outcome -> Rep Outcome x #

to :: Rep Outcome x -> Outcome #

type Rep Outcome #  
Instance details

Defined in Campaign

type Rep Outcome = D1 (MetaData "Outcome" "Campaign" "main" False) (C1 (MetaCons "Win" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Draw" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Loss" PrefixI False) (U1 :: Type -> Type)))

mkJourney :: Team -> Journey #

mkJourney team returns a journey for when the player plays team. In the future it will likely be randomized.

succ :: Level -> Maybe Level #

Given a level, its successor

unsafeJourney :: Level -> Team -> Journey #

An incomplete journey, but fine for playing one game at the given level, against the given team.