A game of rules.
You need to install stack
to work with this.
You need to open AddRule.hs
and change the path in getRule
.
Then, we can build and run the project.
$ stack build
$ stack exec mao-exe
src/MaoLib.hs
contains all the functions which make the DSL possible. To add a new function, put it in the appropriate section. In general, a function should evaluate toStateT GameState IO a
src/AddRuleLib.hs
contains the calls to thehint
library and the input mechanism to parse a new rule. If you want to make libraries or modules available to the rule writers, you can add them in thegetRule
function.src/Examples.hs
is a basic example of using this card game description scheme to come up with a game in which cards are distributed randomly amongst four players, and each player plays a card on their turn. Each card has a score, and the player with the score exceeding 52 first wins. There’s a sample rule given in the comments below which models skipping a turn if the score for that player is even.app/Main.hs
contains the entrypoint into the program.
Please see src/Reference.md
for a description of the DSL in more depth.
Please see docs/presentation.tex
for a description of the actual game, some references and the list of libraries/features used.