Safe Haskell | None |
---|---|
Language | Haskell98 |
- adventurer :: Card
- bureaucrat :: Card
- cellar :: Card
- chancellor :: Card
- chapel :: Card
- councilRoom :: Card
- feast :: Card
- festival :: Card
- laboratory :: Card
- library :: Card
- market :: Card
- militia :: Card
- mine :: Card
- moat :: Card
- moneylender :: Card
- remodel :: Card
- smithy :: Card
- spy :: Card
- thief :: Card
- throneRoom :: Card
- village :: Card
- witch :: Card
- woodcutter :: Card
- workshop :: Card
- gardens :: Card
- originalCards :: [Card]
Documentation
Playing a card is easy:
playerId `plays` adventurer
adventurer :: Card Source #
bureaucrat :: Card Source #
chancellor :: Card Source #
councilRoom :: Card Source #
laboratory :: Card Source #
moneylender :: Card Source #
To turn a gold into a province:
playerId `plays` remodel `with` (Remodel (gold, province))
The Spy
FollowupAction
takes two lists: a list of cards you would
discard for yourself, and a list of cards you would discard for others:
playerId `plays` spy `with` ([estate, duchy, province], [silver, gold])
You need to provide a function that takes a list of treasure cards and
picks one to trash. You can either return a TrashOnly
to trash the
card, or a GainTrashedCard
to put it into your discard pile.
playerId `plays` thief `with` (Thief (GainTrashedCard . sortBy (comparing coinValue)))
throneRoom :: Card Source #
playerId `plays` throneRoom `with` (ThroneRoom market)
woodcutter :: Card Source #
originalCards :: [Card] Source #