/
Base.hs
67 lines (51 loc) · 2.02 KB
/
Base.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{-# LANGUAGE GeneralizedNewtypeDeriving, TemplateHaskell #-}
module Startups.Base where
import qualified Data.Set as S
import Control.Lens
data Age = Age1
| Age2
| Age3
deriving (Ord,Eq,Enum,Show)
data CompanyStage = Project
| Stage1
| Stage2
| Stage3
| Stage4
deriving (Ord,Eq,Enum,Show)
data Company = Facebook -- ^ Rhodes
| Twitter -- ^ Alexandria
| Apple -- ^ Arthemis
| Google -- ^ Babylon
| Instagram -- ^ Zeus statue
| Amazon -- ^ Halicarnasse
| Microsoft -- ^ Gizeh
deriving (Eq, Ord, Enum, Show)
data CompanySide = A | B
deriving (Eq, Ord, Enum, Show)
data CompanyProfile = CompanyProfile Company CompanySide
deriving (Eq, Ord, Show)
data Resource = Youthfulness -- ^ Glass
| Vision -- ^ Papyrus
| Adoption -- ^ Fabric
| Development -- ^ Clay
| Operations -- ^ Stone
| Marketing -- ^ Wood
| Finance -- ^ Ore
deriving (Ord, Eq, Show)
baseResources :: S.Set Resource
baseResources = S.fromList [Development, Operations, Marketing, Finance]
advancedResources :: S.Set Resource
advancedResources = S.fromList [Adoption, Vision, Youthfulness]
newtype Poacher = Poacher { getPoacher :: Integer }
deriving (Ord, Eq, Num, Integral, Real, Enum, Show)
newtype VictoryPoint = VictoryPoint { getVictory :: Integer }
deriving (Ord, Eq, Num, Integral, Real, Enum, Show)
newtype Funding = Funding { getFunding :: Integer }
deriving (Ord, Eq, Num, Integral, Real, Enum, Show)
newtype PlayerCount = PlayerCount { getPlayerCount :: Integer }
deriving (Ord, Eq, Num, Integral, Real, Enum, Show)
data PoachingOutcome = Defeat
| Victory Age
deriving (Eq, Ord, Show)
makePrisms ''Age
makePrisms ''PoachingOutcome