Overview
- pprules is an R package with functions that help generate custom piecepack rulesets and books.
-
save_ruleset()supports saving rulesets in a variety of file formats viapandocwhilesave_pamphlet()supports saving rulesets in a compact tri-fold pamphlet format. -
save_rulebook()supports saving a rulebook. Currently only supports “The Historical Piecepacker”. - This is an extraction and refinement of functionality originally contained in the experimental {ppgames} package.
Installation
To install the pprules R package use the following commands in R:
install.packages("remotes")
remotes::install_github("piecepackr/pprules")If you want to make rulebooks you'll need xelatex and if you want to make rulesets you'll need a recent version of pandoc. The following instructions should work on Ubuntu:
sudo apt install texlive-xetex
sudo apt install cabal-install
cabal update # add $HOME/.cabal/bin to $PATH
cabal install pandocExamples
library("pprules")
gk <- game_kit()
save_pamphlet("tablut", gk=gk)
save_ruleset("nine-mens-morris", gk=gk)
save_rulebook("the-historical-piecepacker", gk=gk)FAQ
What is the license?
Unless otherwise specified the rulesets and rulebooks in the inst directory are licensed under the CC BY-SA 4.0 license. The code in the R, man, and tests directories are dual-licensed under the MIT license.
Related links
Downloadable piecepack rulesets
- piecepack.net
- Piecepack wiki
- pre-generated {pprules}’ Rulesets