Skip to content

Commit

Permalink
enums
Browse files Browse the repository at this point in the history
  • Loading branch information
bartavelle committed Jan 24, 2018
1 parent ead2803 commit 81bf103
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Startups/Cards.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ data CardType = BaseResource -- ^ The "brown" cards, provide basic re
| Commercial -- ^ The "gold" cards, mainly get you funding
| HeadHunting -- ^ The "red" cards, giving poaching power
| Community -- ^ The "purple" cards, giving victory points according to various conditions
deriving (Eq, Show, Ord)
deriving (Eq, Show, Ord, Enum, Bounded)

data Neighbor = NLeft
| NRight
deriving (Ord, Eq, Show)
deriving (Ord, Eq, Show, Enum, Bounded)

data EffectDirection = Neighboring !Neighbor
| Own
Expand All @@ -52,12 +52,12 @@ everyone :: Target
everyone = neighbors <> myself

data Sharing = Shared | Kept
deriving (Ord, Eq, Show)
deriving (Ord, Eq, Show, Enum, Bounded)

data ResearchType = Scaling
| Programming
| CustomSolution
deriving (Ord, Eq, Show)
deriving (Ord, Eq, Show, Enum, Bounded)

data Effect = ProvideResource !Resource !Int !Sharing
| ResourceChoice (S.Set Resource) !Sharing
Expand Down
2 changes: 1 addition & 1 deletion Startups/GameTypes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type Message = PrettyDoc
data PlayerAction = PlayerAction ActionType Card
deriving (Show, Eq)
data ActionType = Play | Drop | BuildCompany
deriving (Show, Eq)
deriving (Show, Eq, Enum, Bounded)

-- | A data structure that represents special capabilities that are used
-- -- when playing a card.
Expand Down

0 comments on commit 81bf103

Please sign in to comment.