A deck-building game simulator engine. I'm writing simulators for multiple games of the genre and hoping to extract a general structure customized per game.
First game is Dominion (https://boardgamegeek.com/boardgame/36218/dominion), the creator of the genre. So far I've implemented the cards of the 2nd edition of the basic game.
How to get it up and running:
- Clone or fork the repository
- Install the stack tool (https://docs.haskellstack.org/en/stable/README/)
- Change to the root directory for the repository and use
- Once it is built, you can run
stack exec -- deckbuilder-exeto try it out.
- To run unit tests:
To create a new playing strategy:
- Create the Haskell file in src/DeckBuilding/Strategies/
- Implement the functions for the Strategy type, see src/DeckBuilding/Dominion/Types.hs for details.
- Try it out/debug it interactively with
- Change app/Main.hs to use your strategy.
- If you do and you like it, submit a PR!
To implement the cards for an expansion:
- Create a Haskell file in the src/DeckBuilding/Dominion/Cards directory called ExpansionName.hs.
- Implement the cards, see src/DeckBuilding/Dominion/Cards/Base.hs for lots of examples and helper functions.
- If you need to make data or algorithm changes, let me know so we can discuss design ideas.
- Have your module publish the cards, the list of cards, etc.
- Write unit tests.
- Submit a PR!