swarm-0.3.0.1: 2D resource gathering game with programmable robots
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.Game.Scenario.Objective.Presentation.Model

Synopsis

Documentation

data GoalStatus Source #

These are intended to be used as keys in a map of lists of goals.

Constructors

Upcoming

Goals in this category have other goals as prerequisites. However, they are only displayed if the "previewable" attribute is true.

Active

Goals in this category may be pursued in parallel. However, they are only displayed if the "hidden" attribute is false.

Completed

A goal's programmatic condition, as well as all its prerequisites, were completed. This is a "latch" mechanism; at some point the conditions required to meet the goal may no longer hold. Nonetheless, the goal remains "completed".

Failed

A goal that can no longer be achieved. If this goal is not an "optional" goal, then the player also Loses the scenario.

Note that currently the only way to Fail a goal is by way of a negative prerequisite that was completed.

Instances

Instances details
ToJSON GoalStatus Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

ToJSONKey GoalStatus Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

Bounded GoalStatus Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

Enum GoalStatus Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

Generic GoalStatus Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

Associated Types

type Rep GoalStatus :: Type -> Type #

Show GoalStatus Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

Eq GoalStatus Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

Ord GoalStatus Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

type Rep GoalStatus Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

type Rep GoalStatus = D1 ('MetaData "GoalStatus" "Swarm.Game.Scenario.Objective.Presentation.Model" "swarm-0.3.0.1-EqejWKaUFCJHRV1d3nJuA2" 'False) ((C1 ('MetaCons "Upcoming" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Active" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Completed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Failed" 'PrefixI 'False) (U1 :: Type -> Type)))

newtype Announcement Source #

TODO: #1044 Could also add an ObjectiveFailed constructor...

Instances

Instances details
ToJSON Announcement Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

Generic Announcement Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

Associated Types

type Rep Announcement :: Type -> Type #

Show Announcement Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

type Rep Announcement Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

type Rep Announcement = D1 ('MetaData "Announcement" "Swarm.Game.Scenario.Objective.Presentation.Model" "swarm-0.3.0.1-EqejWKaUFCJHRV1d3nJuA2" 'True) (C1 ('MetaCons "ObjectiveCompleted" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Objective)))

data GoalTracking Source #

Constructors

GoalTracking 

Fields

Instances

Instances details
ToJSON GoalTracking Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

Generic GoalTracking Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

Associated Types

type Rep GoalTracking :: Type -> Type #

type Rep GoalTracking Source # 
Instance details

Defined in Swarm.Game.Scenario.Objective.Presentation.Model

type Rep GoalTracking = D1 ('MetaData "GoalTracking" "Swarm.Game.Scenario.Objective.Presentation.Model" "swarm-0.3.0.1-EqejWKaUFCJHRV1d3nJuA2" 'False) (C1 ('MetaCons "GoalTracking" 'PrefixI 'True) (S1 ('MetaSel ('Just "announcements") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Announcement]) :*: S1 ('MetaSel ('Just "goals") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CategorizedGoals)))

data GoalDisplay Source #

Constructors

GoalDisplay 

Fields