Skip to contents

R-CMD-check Coverage Status Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.

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 via pandoc while save_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 pandoc

Examples

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.

What games can we generate piecepack rulesets for?

  • alquerque
  • american checkers
  • awithlaknannai mosona
  • backgammon
  • chaturaji
  • cribbage
  • four field kono
  • international chess
  • ludo
  • nine men’s morris
  • pass the food
  • shogi
  • speedy towers
  • tablut
  • twelve men’s morris
  • xiangqi

Downloadable piecepack rulesets