@@ -6,25 +6,14 @@ import Startups.Cards
66
77import qualified Data.Set as S
88import qualified Data.Text as T
9- import Data.Monoid
109
1110getMaxStage :: CompanyProfile -> CompanyStage
1211getMaxStage (CompanyProfile Facebook B ) = Stage2
1312getMaxStage (CompanyProfile Microsoft B ) = Stage4
1413getMaxStage _ = Stage3
1514
16- wondercard :: Company -> CompanyStage -> Cost -> [Effect ] -> Card
17- wondercard c s cost eff = Card (" [" <> T. pack (show c) <> " ] " <> phase) 0 Age1 CompanyStage cost [] eff
18- where
19- phase = case s of
20- Project -> " project phase"
21- Stage1 -> " initial funding"
22- Stage2 -> " grow"
23- Stage3 -> " world takeover"
24- Stage4 -> " And with strange aeons even death may die."
25-
2615getResourceCard :: CompanyProfile -> CompanyStage -> Card
27- getResourceCard (CompanyProfile c _) Project = wondercard c Project " " [ProvideResource r 1 Shared ]
16+ getResourceCard p @ (CompanyProfile c _) Project = CompanyCard p Project " " [ProvideResource r 1 Shared ]
2817 where r = case c of
2918 Facebook -> Finance
3019 Twitter -> Youthfulness
@@ -33,7 +22,7 @@ getResourceCard (CompanyProfile c _) Project = wondercard c Project "" [ProvideR
3322 Instagram -> Marketing
3423 Amazon -> Adoption
3524 Microsoft -> Operations
36- getResourceCard (CompanyProfile c A ) Stage1 = wondercard c Stage1 cost [AddVictory CompanyVictory 3 HappensOnce ]
25+ getResourceCard p @ (CompanyProfile c A ) Stage1 = CompanyCard p Stage1 cost [AddVictory CompanyVictory 3 HappensOnce ]
3726 where
3827 cost = case c of
3928 Facebook -> " MM"
@@ -43,7 +32,7 @@ getResourceCard (CompanyProfile c A) Stage1 = wondercard c Stage1 cost [AddVicto
4332 Instagram -> " MM"
4433 Amazon -> " DD"
4534 Microsoft -> " OO"
46- getResourceCard (CompanyProfile c A ) Stage2 = wondercard c Stage2 cost eff
35+ getResourceCard p @ (CompanyProfile c A ) Stage2 = CompanyCard p Stage2 cost eff
4736 where
4837 (cost, eff) = case c of
4938 Facebook -> (" DDD" , [Poaching 2 ])
@@ -53,7 +42,7 @@ getResourceCard (CompanyProfile c A) Stage2 = wondercard c Stage2 cost eff
5342 Instagram -> (" OO" , [Opportunity (S. fromList [Age1 .. Age3 ])])
5443 Amazon -> (" FFF" , [Recycling ])
5544 Microsoft -> (" MMM" , [AddVictory CompanyVictory 5 HappensOnce ])
56- getResourceCard (CompanyProfile c A ) Stage3 = wondercard c Stage3 cost [AddVictory CompanyVictory 7 HappensOnce ]
45+ getResourceCard p @ (CompanyProfile c A ) Stage3 = CompanyCard p Stage3 cost [AddVictory CompanyVictory 7 HappensOnce ]
5746 where
5847 cost = case c of
5948 Facebook -> " FFFF"
@@ -63,27 +52,27 @@ getResourceCard (CompanyProfile c A) Stage3 = wondercard c Stage3 cost [AddVicto
6352 Instagram -> " FF"
6453 Amazon -> " AA"
6554 Microsoft -> " OOOO"
66- getResourceCard (CompanyProfile c @ Facebook B ) s@ Stage1 = wondercard c s " OOO" [Poaching 1 , AddVictory CompanyVictory 3 HappensOnce , GainFunding 3 HappensOnce ]
67- getResourceCard (CompanyProfile c @ Facebook B ) s@ Stage2 = wondercard c s " FFFF" [Poaching 1 , AddVictory CompanyVictory 4 HappensOnce , GainFunding 4 HappensOnce ]
68- getResourceCard (CompanyProfile c @ Twitter B ) s@ Stage1 = wondercard c s " DD" [ResourceChoice baseResources Kept ]
69- getResourceCard (CompanyProfile c @ Twitter B ) s@ Stage2 = wondercard c s " MM" [ResourceChoice advancedResources Kept ]
70- getResourceCard (CompanyProfile c @ Twitter B ) s@ Stage3 = wondercard c s " OOO" [AddVictory CompanyVictory 7 HappensOnce ]
71- getResourceCard (CompanyProfile c @ Apple B ) s@ Stage1 = wondercard c s " OO" [AddVictory CompanyVictory 2 HappensOnce , GainFunding 4 HappensOnce ]
72- getResourceCard (CompanyProfile c @ Apple B ) s@ Stage2 = wondercard c s " MM" [AddVictory CompanyVictory 3 HappensOnce , GainFunding 4 HappensOnce ]
73- getResourceCard (CompanyProfile c @ Apple B ) s@ Stage3 = wondercard c s " YVA" [AddVictory CompanyVictory 5 HappensOnce , GainFunding 4 HappensOnce ]
74- getResourceCard (CompanyProfile c @ Google B ) s@ Stage1 = wondercard c s " DA" [AddVictory CompanyVictory 3 HappensOnce ]
75- getResourceCard (CompanyProfile c @ Google B ) s@ Stage2 = wondercard c s " MMY" [Efficiency ]
76- getResourceCard (CompanyProfile c @ Google B ) s@ Stage3 = wondercard c s " DDDV" [ScientificBreakthrough ]
77- getResourceCard (CompanyProfile c @ Instagram B ) s@ Stage1 = wondercard c s " MM" [CheapExchange baseResources (S. fromList [NLeft , NRight ])]
78- getResourceCard (CompanyProfile c @ Instagram B ) s@ Stage2 = wondercard c s " OO" [AddVictory CompanyVictory 5 HappensOnce ]
79- getResourceCard (CompanyProfile c @ Instagram B ) s@ Stage3 = wondercard c s " FFA" [CopyCommunity ]
80- getResourceCard (CompanyProfile c @ Amazon B ) s@ Stage1 = wondercard c s " FF" [AddVictory CompanyVictory 2 HappensOnce , Recycling ]
81- getResourceCard (CompanyProfile c @ Amazon B ) s@ Stage2 = wondercard c s " DDD" [AddVictory CompanyVictory 1 HappensOnce , Recycling ]
82- getResourceCard (CompanyProfile c @ Amazon B ) s@ Stage3 = wondercard c s " YVA" [Recycling ]
83- getResourceCard (CompanyProfile c @ Microsoft B ) s@ Stage1 = wondercard c s " MM" [AddVictory CompanyVictory 3 HappensOnce ]
84- getResourceCard (CompanyProfile c @ Microsoft B ) s@ Stage2 = wondercard c s " OOO" [AddVictory CompanyVictory 5 HappensOnce ]
85- getResourceCard (CompanyProfile c @ Microsoft B ) s@ Stage3 = wondercard c s " DDD" [AddVictory CompanyVictory 5 HappensOnce ]
86- getResourceCard (CompanyProfile c @ Microsoft B ) s@ Stage4 = wondercard c s " OOOOA" [AddVictory CompanyVictory 7 HappensOnce ]
55+ getResourceCard c @ (CompanyProfile Facebook B ) s@ Stage1 = CompanyCard c s " OOO" [Poaching 1 , AddVictory CompanyVictory 3 HappensOnce , GainFunding 3 HappensOnce ]
56+ getResourceCard c @ (CompanyProfile Facebook B ) s@ Stage2 = CompanyCard c s " FFFF" [Poaching 1 , AddVictory CompanyVictory 4 HappensOnce , GainFunding 4 HappensOnce ]
57+ getResourceCard c @ (CompanyProfile Twitter B ) s@ Stage1 = CompanyCard c s " DD" [ResourceChoice baseResources Kept ]
58+ getResourceCard c @ (CompanyProfile Twitter B ) s@ Stage2 = CompanyCard c s " MM" [ResourceChoice advancedResources Kept ]
59+ getResourceCard c @ (CompanyProfile Twitter B ) s@ Stage3 = CompanyCard c s " OOO" [AddVictory CompanyVictory 7 HappensOnce ]
60+ getResourceCard c @ (CompanyProfile Apple B ) s@ Stage1 = CompanyCard c s " OO" [AddVictory CompanyVictory 2 HappensOnce , GainFunding 4 HappensOnce ]
61+ getResourceCard c @ (CompanyProfile Apple B ) s@ Stage2 = CompanyCard c s " MM" [AddVictory CompanyVictory 3 HappensOnce , GainFunding 4 HappensOnce ]
62+ getResourceCard c @ (CompanyProfile Apple B ) s@ Stage3 = CompanyCard c s " YVA" [AddVictory CompanyVictory 5 HappensOnce , GainFunding 4 HappensOnce ]
63+ getResourceCard c @ (CompanyProfile Google B ) s@ Stage1 = CompanyCard c s " DA" [AddVictory CompanyVictory 3 HappensOnce ]
64+ getResourceCard c @ (CompanyProfile Google B ) s@ Stage2 = CompanyCard c s " MMY" [Efficiency ]
65+ getResourceCard c @ (CompanyProfile Google B ) s@ Stage3 = CompanyCard c s " DDDV" [ScientificBreakthrough ]
66+ getResourceCard c @ (CompanyProfile Instagram B ) s@ Stage1 = CompanyCard c s " MM" [CheapExchange baseResources (S. fromList [NLeft , NRight ])]
67+ getResourceCard c @ (CompanyProfile Instagram B ) s@ Stage2 = CompanyCard c s " OO" [AddVictory CompanyVictory 5 HappensOnce ]
68+ getResourceCard c @ (CompanyProfile Instagram B ) s@ Stage3 = CompanyCard c s " FFA" [CopyCommunity ]
69+ getResourceCard c @ (CompanyProfile Amazon B ) s@ Stage1 = CompanyCard c s " FF" [AddVictory CompanyVictory 2 HappensOnce , Recycling ]
70+ getResourceCard c @ (CompanyProfile Amazon B ) s@ Stage2 = CompanyCard c s " DDD" [AddVictory CompanyVictory 1 HappensOnce , Recycling ]
71+ getResourceCard c @ (CompanyProfile Amazon B ) s@ Stage3 = CompanyCard c s " YVA" [Recycling ]
72+ getResourceCard c @ (CompanyProfile Microsoft B ) s@ Stage1 = CompanyCard c s " MM" [AddVictory CompanyVictory 3 HappensOnce ]
73+ getResourceCard c @ (CompanyProfile Microsoft B ) s@ Stage2 = CompanyCard c s " OOO" [AddVictory CompanyVictory 5 HappensOnce ]
74+ getResourceCard c @ (CompanyProfile Microsoft B ) s@ Stage3 = CompanyCard c s " DDD" [AddVictory CompanyVictory 5 HappensOnce ]
75+ getResourceCard c @ (CompanyProfile Microsoft B ) s@ Stage4 = CompanyCard c s " OOOOA" [AddVictory CompanyVictory 7 HappensOnce ]
8776getResourceCard _ _ = error " Invalid card"
8877
8978communities :: [Card ]
0 commit comments