{tibble} data frames with (possibly random) setup data for over a hundred board games playable with public domain game systems.{grid}, {ggplot2}, {rayrender}, {rayvertex}, or {rgl} graphics systems or in a command-line interface using {cli} by ppcli::cat_piece().# remotes::install_github("piecepackr/ppdf")
install.packages("ppdf", repos = c('https://piecepackr.r-universe.dev', 'https://cloud.r-project.org'))
df_fujisan <- ppdf::domino_fujisan(seed = 42)
if (requireNamespace("piecepackr", quietly = TRUE) &&
all(capabilities("png"))) {
library("piecepackr")
envir <- game_systems(pawn = "joystick", round = TRUE)
render_piece(df_fujisan, file = "man/figures/README-fujisan.png",
envir = envir, op_scale = 0.5, op_angle = 90,
trans = op_transform, as_top = "pawn_face")
}

df_loa <- ppdf::checker_lines_of_action()
if (requireNamespace("piecepackr", quietly = TRUE) &&
all(capabilities("png"))) {
library("piecepackr")
envir <- game_systems()
render_piece(df_loa, file = "man/figures/README-lines-of-action.png",
envir = envir, op_scale = 0.5, trans = op_transform)
}

df_tablut <- ppdf::piecepack_tablut()
if (requireNamespace("piecepackr", quietly = TRUE) &&
requireNamespace("systemfonts", quietly = TRUE) &&
piecepackr::has_font("Dejavu Sans") &&
all(capabilities(c("cairo", "png")))) {
library("piecepackr")
envir <- game_systems("dejavu", pawn = "joystick")
render_piece(df_tablut, file = "man/figures/README-tablut.png",
envir = envir, op_scale = 0.5,
trans = op_transform, as_top = "pawn_face")
}

An example game of Relativity recorded in the Portable Piecepack Notation (PPN) format:
ppn_file <- system.file("ppn/relativity.ppn", package = "ppn")
cat(paste("\t", readLines(ppn_file)), sep = "\n")
---
Round: Night
GameType:
Name: Relativity
Coins: "n45a5n/3a2243/3n4a2n/a25345"
...
{ Notes: Space has power of adjacency while Time has power of sequence }
1S. d3#e3 1T. d3#d1
2S. c2#c3 2T. d2#b1;M2@e6
3S. b2#a2 3T. e3#b2
4S. f1#f4 4T. e2#a3;M3@e6
5S. c4#d4 5T. f1#a1
6S. c1#c4;M5@b6 6T. b3#a3
7S. f3#a3 7T. d1#a3
8S. f2#f3 8T. b1#d2
9S. f3#a3;Mn@b6 9T. e2#c2
10S. e1#f1 10T. f1#d4
11S. c2#c3 11T. d4#c4
12S. b2#c2 12T. c1#e2;Ma@e6
Since Relativity is one of the games supported by this package (i.e. the function piecepack_relativity()) then ppn::read_ppn() can be used to parse this PPN file and then ppn::animate_game() can be used to animate the parsed game:
library("gifski")
library("piecepackr")
library("ppn") # remotes::install_github("piecepackr/ppn")
library("tweenr")
envir <- game_systems("dejavu")
cfg <- as.list(envir$piecepack)
cfg$suit_color <- "black"
cfg$background_color.r1 <- "#E69F00"
cfg$background_color.r2 <- "#56B4E9"
cfg$background_color.r3 <- "#009E73"
cfg$background_color.r4 <- "#F0E442"
cfg$background_color.r5 <- "#D55E00"
cfg$background_color.r6 <- "#F079A7"
envir$piecepack <- pp_cfg(cfg)
ppn_file <- system.file("ppn/relativity.ppn", package = "ppn")
game <- read_ppn(ppn_file)[[1]]
animate_game(game, file = "man/figures/README-relativity.gif",
annotate = FALSE,
envir = envir, trans = op_transform, op_scale = 0.5,
n_transitions = 3, n_pauses = 2, fps = 7)

{ppdf} supports the following 34 games playable with a (possibly non-8x8) checkers set:
{ppdf} supports the following 6 games playable with a (possibly non-8x8) chess set:
{ppdf} supports the following 10 games playable with a (usually double-6) dominoes set (plus possibly additional components):
{ppdf} supports the following 115 games playable with a piecepack deck (plus possibly additional components):
{ppdf} supports the following 2 games playable with an alquerque set
{ppdf} supports the following 4 games playable with a go set
{ppdf} supports the following 7 games playable with a morris set
{ppdf} supports the following 2 games playable with a reversi set
{ppdf} with {grid}, {ggplot2}, {rayrender}, {rayvertex}, or {rgl} graphics systems.{ppdf} in the terminal with {cli}.