| Title: | Board Game Setups |
|---|---|
| Description: | Generate 'tibble' data frames indicating how to set up over a hundred board games playable with public domain game systems. Data format can be used by 'piecepackr' to generate graphics with the 'grid', 'ggplot2', 'rayrender', 'rayvertex', and 'rgl' graphics systems and by 'ppcli' to generate plaintext graphics with 'cli'. |
| Authors: | Trevor L. Davis [aut, cre] (ORCID: <https://orcid.org/0000-0001-6341-4639>) |
| Maintainer: | Trevor L. Davis <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.3.0-20 |
| Built: | 2026-05-31 07:15:13 UTC |
| Source: | https://github.com/piecepackr/ppdf |
tibble data frames of setups for 2 alquerque variants.
Data frame output can usually be plotted with pmap_piece(df, default.units = "in").
alquerque_alquerque() alquerque_baghchal()alquerque_alquerque() alquerque_baghchal()
Here are links for more information about the various games:
| Game | URL |
| Alquerque | https://en.wikipedia.org/wiki/Alquerque |
| Bagh-chal | https://en.wikipedia.org/wiki/Bagh-chal |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- alquerque_alquerque() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.2.0-1") { ppcli::cat_piece(df) }df <- alquerque_alquerque() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.2.0-1") { ppcli::cat_piece(df) }
alquerque_board() returns an alquerque board.
alquerque_bits() returns alquerque pieces.
alquerque_board(x0 = 1, y0 = 1, ..., suit = "green") alquerque_bits( ..., suit = 1:6, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )alquerque_board(x0 = 1, y0 = 1, ..., suit = "green") alquerque_bits( ..., suit = 1:6, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )
x0 |
X coordinate for the center of the first point |
y0 |
Y coordinate for the center of the first point |
... |
Should be left empty. |
suit |
Suit value (color) of board/bit.
|
x, y
|
Cartesian coordinates (numeric vectors) |
angle |
Rotation of piece (numeric vector of degrees, counter-clockwise).
Will be coerced by |
length.out |
The number of pieces. Not needed if all the arguments are the same length (or of length one) and this length is the same as the number of desired pieces. |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- alquerque_board() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.2.0-1") { ppcli::cat_piece(df) }df <- alquerque_board() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.2.0-1") { ppcli::cat_piece(df) }
tibble data frames of setups for 11 other games playable with a checkers set.
Data frame output can usually be plotted with pmap_piece(df, default.units = "in").
checker_breakthrough(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_crossings(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_dao(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_dodgem( nrows = 3L, cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_focus(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_four_field_kono(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_grasshopper(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_jeson_mor(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_julgonu(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_kangaroo(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_lines_of_action(cell_width = getOption("ppdf.checker_cell_width", 1))checker_breakthrough(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_crossings(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_dao(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_dodgem( nrows = 3L, cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_focus(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_four_field_kono(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_grasshopper(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_jeson_mor(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_julgonu(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_kangaroo(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_lines_of_action(cell_width = getOption("ppdf.checker_cell_width", 1))
cell_width |
Width of board cell. Most renderers support |
nrows |
Number of rows (and columns) in game board. |
Here are links for more information about the various games:
| Game | URL |
| Breakthrough | https://en.wikipedia.org/wiki/Breakthrough_(board_game) |
| Crossings | https://en.wikipedia.org/wiki/Crossings_(game) |
| Dao | https://boardgamegeek.com/boardgame/948/dao |
| Dodgem | https://en.wikipedia.org/wiki/Dodgem |
| Focus | https://en.wikipedia.org/wiki/Focus_(board_game) |
| Four Field Kono | https://en.wikipedia.org/wiki/Four_Field_Kono |
| Grasshopper | http://www.cyningstan.com/game/71/grasshopper |
| Jeson Mor | https://en.wikipedia.org/wiki/Jeson_Mor |
| Jul-Gonu | https://en.wikipedia.org/wiki/Jul-Gonu |
| Kangaroo | https://boardgamegeek.com/boardgame/6132/kangaroo-the-jumping-game |
| Lines of Action | https://en.wikipedia.org/wiki/Lines_of_Action |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- checker_four_field_kono() if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-1") { grid::grid.newpage() render_piece(df, open_device = FALSE, annotate = TRUE) }df <- checker_four_field_kono() if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-1") { grid::grid.newpage() render_piece(df, open_device = FALSE, annotate = TRUE) }
tibble data frames of setups for 23 checkers variants.
Data frame output can usually be plotted with pmap_piece(df, default.units = "in").
checker_american_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_american_pool_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_bashni(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_brazilian_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_canadian_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_column_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_corner_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_czech_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_dameo(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_english_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_frisian_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_gothic_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_international_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_italian_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_jamaican_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_lasca(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_malaysian_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_one_way_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_portuguese_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_russian_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_singaporean_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_spanish_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_thai_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_turkish_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_unified_pool_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_zimbabwean_pool_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) )checker_american_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_american_pool_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_bashni(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_brazilian_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_canadian_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_column_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_corner_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_czech_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_dameo(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_english_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_frisian_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_gothic_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_international_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_italian_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_jamaican_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_lasca(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_malaysian_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_one_way_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_portuguese_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_russian_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_singaporean_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_spanish_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_thai_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_turkish_checkers(cell_width = getOption("ppdf.checker_cell_width", 1)) checker_unified_pool_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_zimbabwean_pool_checkers( cell_width = getOption("ppdf.checker_cell_width", 1) )
cell_width |
Width of board cell. Most renderers support |
Here are links for more information about the various games:
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- checker_american_checkers() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }df <- checker_american_checkers() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }
checker_board() returns a square checkers board of desired size and type.
checker_bits() returns checkers discs.
checker_board( nrows = 8L, ncols = nrows, x0 = 1, y0 = 1, ..., side = "face", piece_side = paste0("board_", side), suit = "green", angle = 0, cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_bits( ..., side = "back", piece_side = paste0("bit_", side), suit = 1:6, x = as.double(1:6), y = 1, angle = 0, cell_width = getOption("ppdf.checker_cell_width", 1), length.out = NA_integer_ )checker_board( nrows = 8L, ncols = nrows, x0 = 1, y0 = 1, ..., side = "face", piece_side = paste0("board_", side), suit = "green", angle = 0, cell_width = getOption("ppdf.checker_cell_width", 1) ) checker_bits( ..., side = "back", piece_side = paste0("bit_", side), suit = 1:6, x = as.double(1:6), y = 1, angle = 0, cell_width = getOption("ppdf.checker_cell_width", 1), length.out = NA_integer_ )
nrows |
Number of rows in game board |
ncols |
Number of columns in game board |
x0 |
X coordinate for the center of the first cell |
y0 |
Y coordinate for the center of the first cell |
... |
Should be left empty. |
side |
Either "face" or "back" |
piece_side |
If |
suit |
Suit value (color) of board/checkers.
|
angle |
Angle of board in degrees. Italian Checkers rotates its board 90 degrees compared to other checkers variants. |
cell_width |
Width of board cell.
|
x, y
|
Cartesian coordinates (numeric vectors) |
length.out |
The number of pieces. Not needed if all the arguments are the same length (or of length one) and this length is the same as the number of desired pieces. |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
dfb <- checker_board(nrows = 4L, ncol = 4L) df1 <- checker_bits(suit = "white", x = c(1, 3), y = 1) df2 <- checker_bits(suit = "white", x = c(2, 4), y = 2) df3 <- checker_bits(suit = "black", x = c(1, 3), y = 3) df4 <- checker_bits(suit = "black", x = c(2, 4), y = 4) df <- rbind(dfb, df1, df2, df3, df4) if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-1") { grid::grid.newpage() envir = game_systems() pmap_piece(df, envir = envir, default.units = "in") }dfb <- checker_board(nrows = 4L, ncol = 4L) df1 <- checker_bits(suit = "white", x = c(1, 3), y = 1) df2 <- checker_bits(suit = "white", x = c(2, 4), y = 2) df3 <- checker_bits(suit = "black", x = c(1, 3), y = 3) df4 <- checker_bits(suit = "black", x = c(2, 4), y = 4) df <- rbind(dfb, df1, df2, df3, df4) if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-1") { grid::grid.newpage() envir = game_systems() pmap_piece(df, envir = envir, default.units = "in") }
tibble data frames of setups for 6 chess variants.
Data frame output can usually be plotted with pmap_piece(df, default.units = "in").
chess_chess( cell_width = getOption("ppdf.chess_cell_width", 1), ..., fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" ) chess_chess960( seed = NULL, cell_width = getOption("ppdf.chess_cell_width", 1), ..., fen = NULL ) chess_fischer_random_chess( seed = NULL, cell_width = getOption("ppdf.chess_cell_width", 1), ..., fen = NULL ) chess_horde_chess( ..., cell_width = getOption("ppdf.chess_cell_width", 1), fen = "rnbqkbnr/pppppppp/8/1PP2PP1/PPPPPPPP/PPPPPPPP/PPPPPPPP/PPPPPPPP w kq - 0 1" ) chess_international_chess( cell_width = getOption("ppdf.chess_cell_width", 1), ..., fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" ) chess_jeson_mor( cell_width = getOption("ppdf.chess_cell_width", 1), ..., fen = "nnnnnnnnn/9/9/9/9/9/9/9/NNNNNNNNN" ) chess_monochrome_chess( cell_width = getOption("ppdf.chess_cell_width", 1), ..., fen = "RNBQKBNR/PPPPPPPP/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" ) chess_racing_kings( cell_width = getOption("ppdf.chess_cell_width", 1), ..., fen = "8/8/8/8/8/8/krbnNBRK/qrbnNBRQ w - - 0 1" )chess_chess( cell_width = getOption("ppdf.chess_cell_width", 1), ..., fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" ) chess_chess960( seed = NULL, cell_width = getOption("ppdf.chess_cell_width", 1), ..., fen = NULL ) chess_fischer_random_chess( seed = NULL, cell_width = getOption("ppdf.chess_cell_width", 1), ..., fen = NULL ) chess_horde_chess( ..., cell_width = getOption("ppdf.chess_cell_width", 1), fen = "rnbqkbnr/pppppppp/8/1PP2PP1/PPPPPPPP/PPPPPPPP/PPPPPPPP/PPPPPPPP w kq - 0 1" ) chess_international_chess( cell_width = getOption("ppdf.chess_cell_width", 1), ..., fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" ) chess_jeson_mor( cell_width = getOption("ppdf.chess_cell_width", 1), ..., fen = "nnnnnnnnn/9/9/9/9/9/9/9/NNNNNNNNN" ) chess_monochrome_chess( cell_width = getOption("ppdf.chess_cell_width", 1), ..., fen = "RNBQKBNR/PPPPPPPP/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" ) chess_racing_kings( cell_width = getOption("ppdf.chess_cell_width", 1), ..., fen = "8/8/8/8/8/8/krbnNBRK/qrbnNBRQ w - - 0 1" )
cell_width |
Width of board cell. Most renderers support |
... |
Should be left empty. |
fen |
A FEN string specifying the piece placement. Only the piece placement portion (the first field) of the FEN string is used. |
seed |
Seed that determines setup, either an integer or |
Here are links for more information about the various games:
| Game | URL |
| (International) Chess | https://en.wikipedia.org/wiki/Chess |
| Fischer Random Chess AKA Chess960 | https://www.chessvariants.com/diffsetup.dir/fischer.html |
| Horde Chess | https://lichess.org/variant/horde |
| Jeson Mor | https://en.wikipedia.org/wiki/Jeson_Mor |
| Monochrome Chess | https://wunderland.com/WTS/Andy/Games/monochess.html |
| Racing Kings | https://www.chessvariants.com/diffobjective.dir/racing.html |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- chess_international_chess() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }df <- chess_international_chess() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }
chess_board() returns a square checkered board of desired size and type.
chess_bits() returns chess pieces.
chess_board( nrows = 8L, ncols = nrows, x0 = 1, y0 = 1, ..., side = "face", piece_side = paste0("board_", side), suit = "green", angle = 0, cell_width = getOption("ppdf.chess_cell_width", 1) ) chess_bits( ..., suit = rep(1:6, each = 6L), rank = rep(1:6, 6L), x = rep(1:6, 6L), y = rep(1:6, each = 6L), angle = 0, cell_width = getOption("ppdf.chess_cell_width", 1), length.out = NA_integer_ )chess_board( nrows = 8L, ncols = nrows, x0 = 1, y0 = 1, ..., side = "face", piece_side = paste0("board_", side), suit = "green", angle = 0, cell_width = getOption("ppdf.chess_cell_width", 1) ) chess_bits( ..., suit = rep(1:6, each = 6L), rank = rep(1:6, 6L), x = rep(1:6, 6L), y = rep(1:6, each = 6L), angle = 0, cell_width = getOption("ppdf.chess_cell_width", 1), length.out = NA_integer_ )
nrows |
Number of rows in game board |
ncols |
Number of columns in game board |
x0 |
X coordinate for the center of the first cell |
y0 |
Y coordinate for the center of the first cell |
... |
Should be left empty. |
side |
Either "face" or "back" |
piece_side |
If |
suit |
Suit value (color) of board and pieces.
|
angle |
Rotation of bit/board (numeric vector of degrees, counter-clockwise).
Will be coerced by |
cell_width |
Width of board cell.
|
rank |
Rank value of chess pieces from |
x, y
|
Cartesian coordinates (numeric vectors) |
length.out |
The number of pieces. Not needed if all the arguments are the same length (or of length one) and this length is the same as the number of desired pieces. |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
# David Silverman's "Mini chess 4x4" dfb <- chess_board(nrows = 4L, ncol = 4L) df1 <- chess_bits(suit = "white", rank = c("R", "Q", "K", "R"), x = 1:4, y= 1) df2 <- chess_bits(suit = "white", rank = "P", x = 1:4, y= 2) df3 <- chess_bits(suit = "black", rank = "P", x = 1:4, y= 3) df4 <- chess_bits(suit = "black", rank = c("r", "q", "k", "r"), x = 1:4, y= 4) df <- rbind(dfb, df1, df2, df3, df4) if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-1" && requireNamespace("systemfonts", quietly = TRUE) && piecepackr::has_font("Dejavu Sans") && piecepackr:::device_supports_unicode()) { grid::grid.newpage() envir = game_systems("dejavu") pmap_piece(df, envir = envir, default.units = "in") }# David Silverman's "Mini chess 4x4" dfb <- chess_board(nrows = 4L, ncol = 4L) df1 <- chess_bits(suit = "white", rank = c("R", "Q", "K", "R"), x = 1:4, y= 1) df2 <- chess_bits(suit = "white", rank = "P", x = 1:4, y= 2) df3 <- chess_bits(suit = "black", rank = "P", x = 1:4, y= 3) df4 <- chess_bits(suit = "black", rank = c("r", "q", "k", "r"), x = 1:4, y= 4) df <- rbind(dfb, df1, df2, df3, df4) if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-1" && requireNamespace("systemfonts", quietly = TRUE) && piecepackr::has_font("Dejavu Sans") && piecepackr:::device_supports_unicode()) { grid::grid.newpage() envir = game_systems("dejavu") pmap_piece(df, envir = envir, default.units = "in") }
cube_bits() returns cubes.
cube_bits( ..., suit = 1:6, rank = 2L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )cube_bits( ..., suit = 1:6, rank = 2L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )
... |
Should be left empty. |
suit |
Suit value (color) of cubes.
|
rank |
Determines the size of the cube from 8mm (rank 1) to 25mm (rank 6). Default is 10mm cubes. |
x, y
|
Cartesian coordinates (numeric vectors) |
angle |
Rotation of piece (numeric vector of degrees, counter-clockwise).
Will be coerced by |
length.out |
The number of pieces. Not needed if all the arguments are the same length (or of length one) and this length is the same as the number of desired pieces. |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- cube_bits(suit = 6:1, rank = 6:1, x = 6:1, y = 1) if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df) } if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.16.0-3") { grid::grid.newpage() envir = game_systems() pmap_piece(df, envir = envir, default.units = "in", op_scale = 0.5) }df <- cube_bits(suit = 6:1, rank = 6:1, x = 6:1, y = 1) if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df) } if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.16.0-3") { grid::grid.newpage() envir = game_systems() pmap_piece(df, envir = envir, default.units = "in", op_scale = 0.5) }
dice_dice() generates data frames for standard six-sided dice.
d4_dice(), numeral_dice(), d8_dice(), d10_dice(), percentile_dice(), d12_dice(), and d20_dice() generates data frames for the classic seven polyhedral dice.
fudge_dice() generates data frames for fudge dice.
dice_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) d4_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) fudge_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) numeral_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) d8_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) d10_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) percentile_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) d12_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) d20_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )dice_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) d4_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) fudge_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) numeral_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) d8_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) d10_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) percentile_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) d12_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ ) d20_dice( ..., suit = 1:6, rank = 1L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )
... |
Should be left empty. |
suit |
Suit value (color) of dice.
|
rank |
Rank value of dice from |
x, y
|
Cartesian coordinates (numeric vectors) |
angle |
Rotation of dice (numeric vector of degrees, counter-clockwise).
Will be coerced by |
length.out |
The number of pieces. Not needed if all the arguments are the same length (or of length one) and this length is the same as the number of desired pieces. |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
dfd <- dice_dice(suit = 1:6, rank = 1:6, x = 1:6, y = 1) dfn <- numeral_dice(suit = 1:6, rank = 1:6, x = 1:6, y = 2) dff <- fudge_dice(suit = 1:6, rank = rep(c("-", " ", "+"), 2L), x = 1:6, y = 3) dfd12 <- d12_dice(suit = 1:6, rank = 1:6, x = 1:6, y = 4) df <- rbind(dfd, dfn, dff, dfd12) if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-1" && piecepackr:::device_supports_unicode()) { grid::grid.newpage() envir = game_systems() pmap_piece(df, envir = envir, default.units = "in", op_scale = 0.01) }dfd <- dice_dice(suit = 1:6, rank = 1:6, x = 1:6, y = 1) dfn <- numeral_dice(suit = 1:6, rank = 1:6, x = 1:6, y = 2) dff <- fudge_dice(suit = 1:6, rank = rep(c("-", " ", "+"), 2L), x = 1:6, y = 3) dfd12 <- d12_dice(suit = 1:6, rank = 1:6, x = 1:6, y = 4) df <- rbind(dfd, dfn, dff, dfd12) if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-1" && piecepackr:::device_supports_unicode()) { grid::grid.newpage() envir = game_systems() pmap_piece(df, envir = envir, default.units = "in", op_scale = 0.01) }
tibble data frames of setups for 10 dominoes variants.
Data frame output can usually be plotted with pmap_piece(df, default.units = "in").
domino_concentration(seed = NULL) domino_bee_donimoes(n = 7, seed = NULL) domino_finder(seed = NULL) domino_freecell(n = 7, seed = NULL) domino_fujisan(seed = NULL, ..., pips = NULL, pawns = "S12M/A12C") domino_luzon(seed = NULL) domino_patience(seed = NULL) domino_runners(seed = NULL) domino_the_jubilee(seed = NULL) domino_the_sultan(seed = NULL)domino_concentration(seed = NULL) domino_bee_donimoes(n = 7, seed = NULL) domino_finder(seed = NULL) domino_freecell(n = 7, seed = NULL) domino_fujisan(seed = NULL, ..., pips = NULL, pawns = "S12M/A12C") domino_luzon(seed = NULL) domino_patience(seed = NULL) domino_runners(seed = NULL) domino_the_jubilee(seed = NULL) domino_the_sultan(seed = NULL)
seed |
Seed that determines setup, either an integer or |
n |
The number of doubles in a set e.g. |
... |
Should be left empty. |
pips |
A vector or matrix of Fuji-san pip layout, or |
pawns |
A FEN-like string of the initial pawn placement.
The four pawns |
Here are links for more information about the various games:
| Game | URL |
| Bee Donimoes | https://donkirkby.github.io/donimoes/rules.html#bee-donimoes |
| Concentration | http://www.domino-play.com/Games/Concentration.htm |
| Domino Finder | https://donkirkby.github.io/donimoes/rules.html#domino-finder |
| Dominoes Freecell | https://www.pagat.com/invented/domfreecell.html |
| (Domino) Fuji-san | http://donkirkby.github.io/donimoes/rules.html#fujisan |
| Luzon | http://www.domino-play.com/Games/Luzon.htm |
| (Domino) Patience | http://www.domino-play.com/Games/Patience.htm |
| Domino Runners | https://donkirkby.github.io/donimoes/rules.html#domino-runners |
| The Jubilee | http://www.domino-play.com/Games/Jubilee.htm |
| The Sultan | http://www.domino-play.com/Games/Sultan.htm |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- domino_the_jubilee() if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-9") { grid::grid.newpage() envir = game_systems(round = TRUE) pmap_piece(df, envir = envir, default.units = "in", trans = op_transform, op_scale = 0.5) }df <- domino_the_jubilee() if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-9") { grid::grid.newpage() envir = game_systems(round = TRUE) pmap_piece(df, envir = envir, default.units = "in", trans = op_transform, op_scale = 0.5) }
domino_tiles() generates a data frame of dominoes tiles.
By default will generate all the dominoes tiles of a double-6 set.
domino_tiles( n = 7, ..., side = "face", piece_side = paste0("tile_", side), suit = sequence(n:1, from = 1:n), rank = rep.int(1:n, n:1), cfg = "dominoes", x = sequence(n:1, from = 1:n), y = 2 * rep.int(n:1, n:1) - 0.5, angle = 0 )domino_tiles( n = 7, ..., side = "face", piece_side = paste0("tile_", side), suit = sequence(n:1, from = 1:n), rank = rep.int(1:n, n:1), cfg = "dominoes", x = sequence(n:1, from = 1:n), y = 2 * rep.int(n:1, n:1) - 0.5, angle = 0 )
n |
The number of doubles in a set e.g. |
... |
Should be left empty. |
side |
Either "face" or "back". |
piece_side |
Either "tile_face" or "tile_back". |
suit |
"Bottom" half of domino. Will be coerced by |
rank |
"Top" half of domino. Will be coerced by |
cfg |
"dominoes" or perhaps "dominoes_black", "dominoes_blue", "dominoes_green", "dominoes_red", "dominoes_white", or "dominoes_yellow". |
x, y
|
Cartesian coordinates (numeric vectors) |
angle |
Rotation of dominoes (numeric vector of degrees, counter-clockwise). Will be coerced by |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df_double6 <- domino_tiles() nrow(df_double6) df_double9 <- domino_tiles(n = 10) nrow(df_double9) df_double12 <- domino_tiles(n = 13) nrow(df_double12) df_double15 <- domino_tiles(n = 16) nrow(df_double15)df_double6 <- domino_tiles() nrow(df_double6) df_double9 <- domino_tiles(n = 10) nrow(df_double9) df_double12 <- domino_tiles(n = 13) nrow(df_double12) df_double15 <- domino_tiles(n = 16) nrow(df_double15)
chess_games(), domino_games(), checker_games(), piecepack_games(), and stackpack_games()
contain information about the games
whose setups are provided by this package.
alquerque_games() chess_games() checker_games() domino_games() go_games() marble_games() morris_games() piecepack_games() reversi_games() stackpack_games() tarot_games()alquerque_games() chess_games() checker_games() domino_games() go_games() marble_games() morris_games() piecepack_games() reversi_games() stackpack_games() tarot_games()
A tibble::tibble() data frame with character columns "game", "methods", "comment", and "url"
for game name, setup function name(s), possible comment, and url for more information.
head(piecepack_games()) # Number of games for each game system nrow(alquerque_games()) nrow(chess_games()) nrow(checker_games()) nrow(domino_games()) nrow(go_games()) nrow(marble_games()) nrow(morris_games()) nrow(piecepack_games()) nrow(stackpack_games())head(piecepack_games()) # Number of games for each game system nrow(alquerque_games()) nrow(chess_games()) nrow(checker_games()) nrow(domino_games()) nrow(go_games()) nrow(marble_games()) nrow(morris_games()) nrow(piecepack_games()) nrow(stackpack_games())
tibble data frames of setups for 4 go variants.
Data frame output can usually be plotted with pmap_piece(df, default.units = "in").
go_connect6(nrows = 19L, ncols = nrows) go_go(nrows = 19L, ncols = nrows) go_gomoku(nrows = 15L, ncols = nrows) go_renju(nrows = 15L, ncols = nrows)go_connect6(nrows = 19L, ncols = nrows) go_go(nrows = 19L, ncols = nrows) go_gomoku(nrows = 15L, ncols = nrows) go_renju(nrows = 15L, ncols = nrows)
nrows |
Number of rows (lines) in game board |
ncols |
Number of columns (lines) in game board |
Here are links for more information about the various games:
| Game | URL |
| Connect6 | https://en.wikipedia.org/wiki/Connect6 |
| Go | https://en.wikipedia.org/wiki/Go_(game) |
| Gomoku | https://en.wikipedia.org/wiki/Gomoku |
| Renju | https://en.wikipedia.org/wiki/Renju |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- go_go() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.2.0-1") { ppcli::cat_piece(df, annotate = TRUE) }df <- go_go() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.2.0-1") { ppcli::cat_piece(df, annotate = TRUE) }
go_board() returns an go board.
go_bits() returns go pieces.
go_board(nrows = 19L, ncols = nrows, x0 = 1, y0 = 1, ..., suit = "black") go_bits( ..., suit = 1:6, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )go_board(nrows = 19L, ncols = nrows, x0 = 1, y0 = 1, ..., suit = "black") go_bits( ..., suit = 1:6, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )
nrows |
Number of rows in game board |
ncols |
Number of columns in game board |
x0 |
X coordinate for the center of the first point |
y0 |
Y coordinate for the center of the first point |
... |
Should be left empty. |
suit |
Suit value (color) of board/bit.
|
x, y
|
Cartesian coordinates (numeric vectors) |
angle |
Rotation of piece (numeric vector of degrees, counter-clockwise).
Will be coerced by |
length.out |
The number of pieces. Not needed if all the arguments are the same length (or of length one) and this length is the same as the number of desired pieces. |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
dfb <- go_board() dfw <- go_bits(suit = "white", x = c(1:9, 11:19), y = c(1:9, 11:19)) dfk <- go_bits(suit = "black", x = 1:19, y = 19:1) df <- rbind(dfb, dfw, dfk) if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.2.0-1") { ppcli::cat_piece(df, annotate = TRUE) } dfb <- go_board(4L, 4L) dfw <- go_bits(suit = "white", x = 1:4, y = 1:4) dfk <- go_bits(suit = "black", x = 1:4, y = 4:1) df <- rbind(dfb, dfw, dfk) if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-9") { grid::grid.newpage() envir = game_systems(background_color = "burlywood") pmap_piece(df, envir = envir, default.units = "in") }dfb <- go_board() dfw <- go_bits(suit = "white", x = c(1:9, 11:19), y = c(1:9, 11:19)) dfk <- go_bits(suit = "black", x = 1:19, y = 19:1) df <- rbind(dfb, dfw, dfk) if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.2.0-1") { ppcli::cat_piece(df, annotate = TRUE) } dfb <- go_board(4L, 4L) dfw <- go_bits(suit = "white", x = 1:4, y = 1:4) dfk <- go_bits(suit = "black", x = 1:4, y = 4:1) df <- rbind(dfb, dfw, dfk) if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-9") { grid::grid.newpage() envir = game_systems(background_color = "burlywood") pmap_piece(df, envir = envir, default.units = "in") }
marble_board() returns a square holed board of desired size and color.
marble_bits() returns marble pieces.
marble_board( nrows = 4L, ncols = nrows, x0 = 1 * scale_factor, y0 = 1 * scale_factor, ..., suit = "cyan", scale_factor = 0.5 ) marble_bits( ..., suit = 1:6, rank = 9L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )marble_board( nrows = 4L, ncols = nrows, x0 = 1 * scale_factor, y0 = 1 * scale_factor, ..., suit = "cyan", scale_factor = 0.5 ) marble_bits( ..., suit = 1:6, rank = 9L, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )
nrows |
Number of rows in game board (i.e. number of holes vertically) |
ncols |
Number of columns in game board (i.e. number of holes horizontally) |
x0 |
X coordinate for the center of the first hole |
y0 |
Y coordinate for the center of the first hole |
... |
Should be left empty. |
suit |
Suit value (color) of board and bits.
|
scale_factor |
Used by |
rank |
Determines the size of the marble from 0.5 inch diameter (rank 1) to 1.0 inch diamter (rank 9). The default is 1.0 inch diameter marbles which match the holed boards. |
x, y
|
Cartesian coordinates (numeric vectors) |
angle |
Rotation of piece (numeric vector of degrees, counter-clockwise).
Will be coerced by |
length.out |
The number of pieces. Not needed if all the arguments are the same length (or of length one) and this length is the same as the number of desired pieces. |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
dfb <- marble_board(nrows = 2L, scale_factor = 1.0) dfm <- marble_bits(x = c(1:2, 1:2, 1.5), y = c(1, 1, 2, 2, 1.5), suit = c(1:3, 5:6)) df <- rbind(dfb, dfm) if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-1") { grid::grid.newpage() envir = game_systems() pmap_piece(df, envir = envir, default.units = "in") }dfb <- marble_board(nrows = 2L, scale_factor = 1.0) dfm <- marble_bits(x = c(1:2, 1:2, 1.5), y = c(1, 1, 2, 2, 1.5), suit = c(1:3, 5:6)) df <- rbind(dfb, dfm) if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-1") { grid::grid.newpage() envir = game_systems() pmap_piece(df, envir = envir, default.units = "in") }
meeple_bits() returns meeples.
meeple_bits( ..., side = "face", piece_side = paste0("bit_", side), suit = 1:6, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )meeple_bits( ..., side = "face", piece_side = paste0("bit_", side), suit = 1:6, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )
... |
Should be left empty. |
side |
Either "face" or "back". |
piece_side |
Either "tile_face" or "tile_back". |
suit |
Suit value (color) of meeples.
|
x, y
|
Cartesian coordinates (numeric vectors) |
angle |
Rotation of piece (numeric vector of degrees, counter-clockwise).
Will be coerced by |
length.out |
The number of pieces. Not needed if all the arguments are the same length (or of length one) and this length is the same as the number of desired pieces. |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
a <- c(0, 90, 180, 270, 0, 90) df1 <- meeple_bits(side = "face", suit = 1:6, x = 1:6, y = 1, angle = a) df2 <- meeple_bits(side = "top", suit = 1:6, x = 1:6, y = 2, angle = a) df <- rbind(df1, df2) if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-1") { grid::grid.newpage() envir = game_systems() pmap_piece(df, envir = envir, default.units = "in", op_scale = 0.5) }a <- c(0, 90, 180, 270, 0, 90) df1 <- meeple_bits(side = "face", suit = 1:6, x = 1:6, y = 1, angle = a) df2 <- meeple_bits(side = "top", suit = 1:6, x = 1:6, y = 2, angle = a) df <- rbind(df1, df2) if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-1") { grid::grid.newpage() envir = game_systems() pmap_piece(df, envir = envir, default.units = "in", op_scale = 0.5) }
tibble data frames of setups for 7 morris variants.
Data frame output can usually be plotted with pmap_piece(df, default.units = "in").
morris_three_mens_morris() morris_five_mens_morris() morris_six_mens_morris() morris_seven_mens_morris() morris_nine_mens_morris() morris_ten_mens_morris() morris_lasker_morris() morris_twelve_mens_morris()morris_three_mens_morris() morris_five_mens_morris() morris_six_mens_morris() morris_seven_mens_morris() morris_nine_mens_morris() morris_ten_mens_morris() morris_lasker_morris() morris_twelve_mens_morris()
Here are links for more information about the various games:
| Game | URL |
| Three Men's Morris | https://en.wikipedia.org/wiki/Three_men%27s_morris |
| Five Men's Morris | https://en.wikipedia.org/wiki/Nine_men%27s_morris#Six_men's_morris |
| Six Men's Morris | https://boardgamegeek.com/boardgame/25702/six-mens-morris |
| Seven Men's Morris | https://en.wikipedia.org/wiki/Nine_men%27s_morris#Six_men's_morris |
| Nine Men's Morris | https://en.wikipedia.org/wiki/Nine_men%27s_morris |
| Ten Men's Morris aka Lasker Morris | https://en.wikipedia.org/wiki/Nine_men%27s_morris#Lasker_morris |
| Twelve Men's Morris | https://en.wikipedia.org/wiki/Morabaraba |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- morris_nine_mens_morris() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.2.0-8") { ppcli::cat_piece(df, annotate = TRUE) } df <- morris_three_mens_morris() if (requireNamespace("piecepackr", quietly = TRUE)) { piecepackr::render_piece(df, open_device = FALSE, annotate = TRUE) }df <- morris_nine_mens_morris() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.2.0-8") { ppcli::cat_piece(df, annotate = TRUE) } df <- morris_three_mens_morris() if (requireNamespace("piecepackr", quietly = TRUE)) { piecepackr::render_piece(df, open_device = FALSE, annotate = TRUE) }
morris_board() returns various morris boards.
morris_bits() returns morris pieces aka merels.
morris_board(n = 9L, x0 = 1, y0 = 1, ..., suit = "green") morris_bits( ..., suit = 1:6, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )morris_board(n = 9L, x0 = 1, y0 = 1, ..., suit = "green") morris_bits( ..., suit = 1:6, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )
n |
The number of "men" the morris board is for. |
x0 |
X coordinate for the center of the first point |
y0 |
Y coordinate for the center of the first point |
... |
Should be left empty. |
suit |
Suit value (color) of board/bit.
|
x, y
|
Cartesian coordinates (numeric vectors) |
angle |
Rotation of piece (numeric vector of degrees, counter-clockwise).
Will be coerced by |
length.out |
The number of pieces. Not needed if all the arguments are the same length (or of length one) and this length is the same as the number of desired pieces. |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- morris_board(9L) if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.2.0-8") { ppcli::cat_piece(df, annotate = TRUE) } df <- morris_board(n = 3L) if (requireNamespace("piecepackr", quietly = TRUE)) { piecepackr::render_piece(df, open_device = FALSE, annotate = TRUE) }df <- morris_board(9L) if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.2.0-8") { ppcli::cat_piece(df, annotate = TRUE) } df <- morris_board(n = 3L) if (requireNamespace("piecepackr", quietly = TRUE)) { piecepackr::render_piece(df, open_device = FALSE, annotate = TRUE) }
normalize_name() normalizes (game) name(s).
normalize_name(x, sep = "_")normalize_name(x, sep = "_")
x |
Name to normalize. |
sep |
Separator character. |
normalize_name(x, sep = "_") is used to help create R variable names while normalize_name(x, sep = "-")' is used to help create filenames and LaTeX labels.
Character vector of normalized names.
normalize_name("Fuji-san") normalize_name("Nine Men's Morris", sep = "-")normalize_name("Fuji-san") normalize_name("Nine Men's Morris", sep = "-")
These functions help make sure angle values are the
right double values expected by the configurations used by
piecepackr::game_systems() and ppn::read_ppn().
If the input is numeric it simply uses as.double() and if the
input is character it tries to cast to a reasonable value.
piece_angle(angle)piece_angle(angle)
angle |
A numeric or character vector of angle values. |
An double vector of angle values.
piece_angle(c("^", "<", "v", ">")) piece_angle(c("\U0001f06e", "\U0001f038"))piece_angle(c("^", "<", "v", ">")) piece_angle(c("\U0001f06e", "\U0001f038"))
These functions help make sure rank values are the
right integer values expected by the configurations used by
piecepackr::game_systems() and ppn::read_ppn().
If the input is numeric simply use as.integer() and if the
input is character try to cast to a reasonable value.
piece_rank(rank) chess_rank(rank) dice_rank(rank) fudge_dice_rank(rank) percentile_dice_rank(rank) tarot_rank(rank)piece_rank(rank) chess_rank(rank) dice_rank(rank) fudge_dice_rank(rank) percentile_dice_rank(rank) tarot_rank(rank)
rank |
A numeric or character vector of rank values. |
An integer vector of rank values.
chess_rank(c("P", "N", "B", "R", "Q", "K")) chess_rank(c("\u265f", "\u265e", "\u265d", "\u265c", "\u265b", "\u265a")) dice_rank(c("1", "2", "6")) dice_rank(c("\u2680", "\u2681", "\u2685")) fudge_dice_rank(c("-", " ", "+")) percentile_dice_rank(c("00", "10", "90")) piece_rank(c("n", "a", "2", "3", "4", "5")) piece_rank(c("\U0001f06e", "\U0001f038")) piece_rank(c("zero", "one", "eighteen")) tarot_rank(c("ace", "ten", "jack", "knight", "queen", "king"))chess_rank(c("P", "N", "B", "R", "Q", "K")) chess_rank(c("\u265f", "\u265e", "\u265d", "\u265c", "\u265b", "\u265a")) dice_rank(c("1", "2", "6")) dice_rank(c("\u2680", "\u2681", "\u2685")) fudge_dice_rank(c("-", " ", "+")) percentile_dice_rank(c("00", "10", "90")) piece_rank(c("n", "a", "2", "3", "4", "5")) piece_rank(c("\U0001f06e", "\U0001f038")) piece_rank(c("zero", "one", "eighteen")) tarot_rank(c("ace", "ten", "jack", "knight", "queen", "king"))
These functions help make sure suit values are the
right integer values expected by the configurations used by
piecepackr::game_systems() and ppn::read_ppn().
If the input is numeric it simply uses as.integer() and if the
input is character it tries to cast to a reasonable value.
piece_suit(suit) domino_suit(suit) tarot_suit(suit)piece_suit(suit) domino_suit(suit) tarot_suit(suit)
suit |
A numeric or character vector of suit values. |
An integer vector of suit values.
piece_suit(c("red", "black", "green", "blue", "yellow", "white")) piece_suit(c("R", "K", "G", "B", "Y", "W")) piece_suit(c("suns", "moons", "crowns", "arms")) piece_suit(c("S", "M", "C", "A")) domino_suit(c("\U0001f06e", "\U0001f038")) domino_suit(c("zero", "one", "eighteen")) tarot_suit(c("\u2665", "\u2660", "\u2663", "\u2666")) tarot_suit(c("hearts", "spades", "clubs", "diamonds", "trumps")) tarot_suit(c("H", "S", "C", "D"))piece_suit(c("red", "black", "green", "blue", "yellow", "white")) piece_suit(c("R", "K", "G", "B", "Y", "W")) piece_suit(c("suns", "moons", "crowns", "arms")) piece_suit(c("S", "M", "C", "A")) domino_suit(c("\U0001f06e", "\U0001f038")) domino_suit(c("zero", "one", "eighteen")) tarot_suit(c("\u2665", "\u2660", "\u2663", "\u2666")) tarot_suit(c("hearts", "spades", "clubs", "diamonds", "trumps")) tarot_suit(c("H", "S", "C", "D"))
piecepack_rectangular_board() returns a tibble data frame of a rectangular board of desired size
made using a maximum number of piecepack tiles.
It will use either “cells”, “points”, and/or “rivers” as necessary.
piecepack_donut_board() returns 24 tiles arranged 5x5 with hole in middle.
piecepack_donut_board( ..., side = "back", piece_side = paste0("tile_", side), suit = rep(1:4, each = 6L), rank = rep.int(1:6, 4L), cfg = "piecepack", x0 = 1, y0 = 1, angle = 0 ) piecepack_rectangular_board( nrows = 8L, ncols = 8L, x0 = 1, y0 = 1, ..., max_tiles = 24L, suit = rep.int(1:4, 6L), rank = rep(1:6, each = 4L), cfg = "piecepack", angle = 0 )piecepack_donut_board( ..., side = "back", piece_side = paste0("tile_", side), suit = rep(1:4, each = 6L), rank = rep.int(1:6, 4L), cfg = "piecepack", x0 = 1, y0 = 1, angle = 0 ) piecepack_rectangular_board( nrows = 8L, ncols = 8L, x0 = 1, y0 = 1, ..., max_tiles = 24L, suit = rep.int(1:4, 6L), rank = rep(1:6, each = 4L), cfg = "piecepack", angle = 0 )
... |
Should be left empty. |
side |
Either "face" or "back". |
piece_side |
Either "tile_face" or "tile_back". |
suit |
Vector of suit values to use for tile back (will be repeated and coerced by |
rank |
Vector of rank values to use for tile back (will be repeated and coerced by |
cfg |
"piecepack" or perhaps "playing_cards_expansion", "dual_piecepacks_expansion", or "subpack". |
x0 |
X coordinate for the center of the first cell/point for |
y0 |
Y coordinate for the center of the first cell/point for |
angle |
Rotation of piece (numeric vector of degrees, counter-clockwise).
Will be coerced by |
nrows |
Number of rows in game board |
ncols |
Number of columns in game board |
max_tiles |
Maximum number of tiles that can be used |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- piecepack_rectangular_board(4L, 4L) if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }df <- piecepack_rectangular_board(4L, 4L) if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }
tibble data frames of setups for 17 checkers variants playable with a piecepack.
Data frame output can usually be plotted with pmap_piece(df, default.units = "in").
piecepack_american_checkers() piecepack_american_pool_checkers() piecepack_bashni() piecepack_brazilian_checkers() piecepack_checkers() piecepack_column_checkers() piecepack_corner_checkers() piecepack_czech_checkers() piecepack_english_checkers() piecepack_gothic_checkers() piecepack_italian_checkers() piecepack_jamaican_checkers() piecepack_one_way_checkers() piecepack_portuguese_checkers() piecepack_russian_checkers() piecepack_spanish_checkers() piecepack_thai_checkers() piecepack_turkish_checkers() piecepack_unified_pool_checkers() piecepack_zimbabwean_pool_checkers()piecepack_american_checkers() piecepack_american_pool_checkers() piecepack_bashni() piecepack_brazilian_checkers() piecepack_checkers() piecepack_column_checkers() piecepack_corner_checkers() piecepack_czech_checkers() piecepack_english_checkers() piecepack_gothic_checkers() piecepack_italian_checkers() piecepack_jamaican_checkers() piecepack_one_way_checkers() piecepack_portuguese_checkers() piecepack_russian_checkers() piecepack_spanish_checkers() piecepack_thai_checkers() piecepack_turkish_checkers() piecepack_unified_pool_checkers() piecepack_zimbabwean_pool_checkers()
Here are links for more information about the various checkers variants:
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- piecepack_american_checkers() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }df <- piecepack_american_checkers() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }
tibble data frames of setups for 11 chess variants playable with a piecepack.
Data frame output can usually be plotted with pmap_piece(df, default.units = "in").
piecepack_alice_chess(has_subpack = FALSE, max_tiles = 24L) piecepack_baroque_chess(has_subpack = FALSE) piecepack_chaturaji(has_subpack = FALSE) piecepack_chess(has_subpack = FALSE) piecepack_chess960(..., seed = NULL, has_subpack = FALSE) piecepack_fischer_random_chess(..., seed = NULL, has_subpack = FALSE) piecepack_chinese_chess(has_subpack = FALSE) piecepack_four_seasons_chess(has_subpack = FALSE) piecepack_international_chess(has_subpack = FALSE) piecepack_jeson_mor() piecepack_japanese_chess(has_subpack = FALSE, cfg2 = "piecepack") piecepack_minishogi() piecepack_racing_kings() piecepack_shogi(has_subpack = FALSE, cfg2 = "piecepack") piecepack_ultima(has_subpack = FALSE) piecepack_xiangqi(has_subpack = FALSE)piecepack_alice_chess(has_subpack = FALSE, max_tiles = 24L) piecepack_baroque_chess(has_subpack = FALSE) piecepack_chaturaji(has_subpack = FALSE) piecepack_chess(has_subpack = FALSE) piecepack_chess960(..., seed = NULL, has_subpack = FALSE) piecepack_fischer_random_chess(..., seed = NULL, has_subpack = FALSE) piecepack_chinese_chess(has_subpack = FALSE) piecepack_four_seasons_chess(has_subpack = FALSE) piecepack_international_chess(has_subpack = FALSE) piecepack_jeson_mor() piecepack_japanese_chess(has_subpack = FALSE, cfg2 = "piecepack") piecepack_minishogi() piecepack_racing_kings() piecepack_shogi(has_subpack = FALSE, cfg2 = "piecepack") piecepack_ultima(has_subpack = FALSE) piecepack_xiangqi(has_subpack = FALSE)
has_subpack |
Has a piecepack subpack |
max_tiles |
Maximum number of (piecepack) tiles available to build boards |
... |
Should be left empty. |
seed |
Seed that determines setup, either an integer or |
cfg2 |
A string of a piecepack expansion (or perhaps |
Here are links for more information about the various chess variants:
| Game | URL |
| Alice Chess | https://en.wikipedia.org/wiki/Alice_chess |
| Chaturaji | https://www.ludism.org/ppwiki/Chaturaji |
| Fischer Random Chess AKA Chess960 | https://www.chessvariants.com/diffsetup.dir/fischer.html |
| Four Seasons Chess | https://www.chessvariants.com/historic.dir/4seiz.html |
| (International) Chess | https://www.ludism.org/ppwiki/Chess |
| Jeson Mor | https://en.wikipedia.org/wiki/Jeson_Mor |
| Minishogi | https://en.wikipedia.org/wiki/Minishogi |
| Racing Kings | https://www.chessvariants.com/diffobjective.dir/racing.html |
| Shogi AKA Japanese Chess | https://www.ludism.org/ppwiki/Shogi |
| Ultima AKA Baroque Chess | https://en.wikipedia.org/wiki/Baroque_chess |
| Xiangqi AKA Chinese Chess | https://www.ludism.org/ppwiki/Xiangqi |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- piecepack_chess() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }df <- piecepack_chess() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }
tibble data frames of setups for 53 games playable with a piecepack.
Data frame output can usually be plotted with pmap_piece(df, default.units = "in").
piecepack_alien_city(seed = NULL, tiles = NULL) piecepack_black_pawn_trucking(seed = NULL) piecepack_brain_burn(seed = NULL) piecepack_burbuja(seed = NULL, tiles = NULL) piecepack_cardinals_guards(seed = NULL, tiles = NULL) piecepack_cell_management(seed = NULL) piecepack_chariots() piecepack_chinese_checkers() piecepack_halma() piecepack_coin_collectors(seed = NULL, tiles = NULL, coins = NULL, dice = NULL) piecepack_climbing_man(seed = NULL, variant = c("Basic", "Free")) piecepack_crocodile_hop(seed = NULL) piecepack_desfases(seed = NULL, tiles = NULL, dice = NULL) piecepack_dominoids(..., seed = NULL) piecepack_easy_slider(seed = NULL, tiles = NULL, coins = NULL, pawns = NULL) piecepack_everest() piecepack_four_blind_mice() piecepack_froggy_bottom() piecepack_fujisan(seed = NULL, coins = NULL, dice = NULL, pawns = "S12M/A12C") piecepack_galaxy_express(seed = NULL) piecepack_iceberg(seed = NULL, tiles = NULL) piecepack_ice_floe() piecepack_japan(seed = NULL) piecepack_klondike(seed = NULL) piecepack_lab_rats(seed = NULL) piecepack_landlocked(seed = NULL) piecepack_ley_lines() piecepack_mathrix(seed = NULL, coins = NULL) piecepack_pawns_crossing(..., seed = NULL, n_players = 2L) piecepack_piecepackman(seed = NULL, variant = "Roundabout") piecepack_one_man_thrag(seed = NULL) piecepack_pass_the_food() piecepack_piece_gaps(seed = NULL) piecepack_piece_packing_pirates(seed = NULL) piecepack_plans_of_action(seed = NULL, coins = NULL) piecepack_relativity(seed = NULL, coins = NULL) piecepack_san_andreas() piecepack_sarcophagus(seed = NULL) piecepack_ship_it(..., seed = NULL) piecepack_shopping_mall(seed = NULL, cfg2 = "go") piecepack_skyscrapers(seed = NULL, tiles = NULL) piecepack_slides_of_action() piecepack_speedy_towers(n_players = 2, seed = NULL) piecepack_steppin_stones(seed = NULL) piecepack_tariffs( variant = c("simple zones", "grouped zones", "scattered zones") ) piecepack_the_in_crowd() piecepack_the_magic_bag(seed = NULL) piecepack_the_penguin_game(seed = NULL) piecepack_tornado_vs_trailer_park() piecepack_tower_of_babel(seed = NULL, tiles = NULL) piecepack_accordion(seed = NULL, tiles = NULL) piecepack_tracers() piecepack_triactor(seed = NULL, cfg2 = "playing_cards_expansion") piecepack_tula( seed = NULL, tiles = NULL, variant = c("Original", "Variant 1", "Variant 2", "Variant 3", "Variant 4") ) piecepack_wormholes()piecepack_alien_city(seed = NULL, tiles = NULL) piecepack_black_pawn_trucking(seed = NULL) piecepack_brain_burn(seed = NULL) piecepack_burbuja(seed = NULL, tiles = NULL) piecepack_cardinals_guards(seed = NULL, tiles = NULL) piecepack_cell_management(seed = NULL) piecepack_chariots() piecepack_chinese_checkers() piecepack_halma() piecepack_coin_collectors(seed = NULL, tiles = NULL, coins = NULL, dice = NULL) piecepack_climbing_man(seed = NULL, variant = c("Basic", "Free")) piecepack_crocodile_hop(seed = NULL) piecepack_desfases(seed = NULL, tiles = NULL, dice = NULL) piecepack_dominoids(..., seed = NULL) piecepack_easy_slider(seed = NULL, tiles = NULL, coins = NULL, pawns = NULL) piecepack_everest() piecepack_four_blind_mice() piecepack_froggy_bottom() piecepack_fujisan(seed = NULL, coins = NULL, dice = NULL, pawns = "S12M/A12C") piecepack_galaxy_express(seed = NULL) piecepack_iceberg(seed = NULL, tiles = NULL) piecepack_ice_floe() piecepack_japan(seed = NULL) piecepack_klondike(seed = NULL) piecepack_lab_rats(seed = NULL) piecepack_landlocked(seed = NULL) piecepack_ley_lines() piecepack_mathrix(seed = NULL, coins = NULL) piecepack_pawns_crossing(..., seed = NULL, n_players = 2L) piecepack_piecepackman(seed = NULL, variant = "Roundabout") piecepack_one_man_thrag(seed = NULL) piecepack_pass_the_food() piecepack_piece_gaps(seed = NULL) piecepack_piece_packing_pirates(seed = NULL) piecepack_plans_of_action(seed = NULL, coins = NULL) piecepack_relativity(seed = NULL, coins = NULL) piecepack_san_andreas() piecepack_sarcophagus(seed = NULL) piecepack_ship_it(..., seed = NULL) piecepack_shopping_mall(seed = NULL, cfg2 = "go") piecepack_skyscrapers(seed = NULL, tiles = NULL) piecepack_slides_of_action() piecepack_speedy_towers(n_players = 2, seed = NULL) piecepack_steppin_stones(seed = NULL) piecepack_tariffs( variant = c("simple zones", "grouped zones", "scattered zones") ) piecepack_the_in_crowd() piecepack_the_magic_bag(seed = NULL) piecepack_the_penguin_game(seed = NULL) piecepack_tornado_vs_trailer_park() piecepack_tower_of_babel(seed = NULL, tiles = NULL) piecepack_accordion(seed = NULL, tiles = NULL) piecepack_tracers() piecepack_triactor(seed = NULL, cfg2 = "playing_cards_expansion") piecepack_tula( seed = NULL, tiles = NULL, variant = c("Original", "Variant 1", "Variant 2", "Variant 3", "Variant 4") ) piecepack_wormholes()
seed |
Seed that determines setup, either an integer or |
tiles |
String of tile layout |
coins |
String of coin layout |
dice |
String of dice layout |
variant |
Name of variant |
... |
Should be left empty. |
pawns |
A FEN-like string of the initial pawn placement.
The four pawns |
n_players |
Number of players |
cfg2 |
A string of a piecepack expansion (or perhaps |
Here are links for more information about the various games:
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- piecepack_relativity(seed = 42) if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }df <- piecepack_relativity(seed = 42) if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }
tibble data frames of setups for 15 other games playable with a piecepack.
Data frame output can usually be plotted with pmap_piece(df, default.units = "in").
piecepack_12345ive() piecepack_breakthrough() piecepack_change_change(seed = NULL, coins = NULL) piecepack_crossings() piecepack_dao() piecepack_dodgem(nrows = 6L, variant = "vout") piecepack_evade() piecepack_kangaroo() piecepack_kings_valley(variant = "standard") piecepack_leapfrog() piecepack_grasshopper() piecepack_lines_of_action() piecepack_lukawan() piecepack_quatri() piecepack_three_musketeers()piecepack_12345ive() piecepack_breakthrough() piecepack_change_change(seed = NULL, coins = NULL) piecepack_crossings() piecepack_dao() piecepack_dodgem(nrows = 6L, variant = "vout") piecepack_evade() piecepack_kangaroo() piecepack_kings_valley(variant = "standard") piecepack_leapfrog() piecepack_grasshopper() piecepack_lines_of_action() piecepack_lukawan() piecepack_quatri() piecepack_three_musketeers()
seed |
Seed that determines setup, either an integer or |
coins |
String of coin layout |
nrows |
Number of rows (and columns) in game board. |
variant |
Name of variant. |
Here are links for more information about the various other games:
| Game | URL |
| 12345ive! | https://boardgamegeek.com/boardgame/154644/12345ive |
| Breakthrough | https://en.wikipedia.org/wiki/Breakthrough_(board_game) |
| Crossings | https://en.wikipedia.org/wiki/Crossings_(game) |
| Change Change | https://www.ludism.org/ppwiki/ChangeChange |
| Dao | https://boardgamegeek.com/boardgame/948/dao |
| Dodgem | https://en.wikipedia.org/wiki/Dodgem |
| Grasshopper | http://www.cyningstan.com/game/71/grasshopper |
| Evade | https://www.ludism.org/ppwiki/Evade |
| Kangaroo | https://boardgamegeek.com/boardgame/6132/kangaroo-the-jumping-game |
| King's Valley | https://www.logygames.com/english/kingsvalley.html |
| Leapfrog | https://youtu.be/LWuVDFmPkZs |
| Lines of Action | https://en.wikipedia.org/wiki/Lines_of_Action |
| Lukawan | https://ludism.org/ppwiki/Lukawan |
| Quatri | https://www.ludism.org/ppwiki/Quatri |
| Three Musketeers | https://boardgamegeek.com/boardgame/21861/three-musketeers |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- piecepack_dao() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }df <- piecepack_dao() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }
tibble data frames of setups for 19 other traditional games playable with a piecepack.
Data frame output can usually be plotted with pmap_piece(df, default.units = "in").
piecepack_achi() piecepack_alquerque(has_matchsticks = FALSE) piecepack_awithlaknannai_mosona(has_matchsticks = FALSE) piecepack_backgammon() piecepack_baghchal(has_matchsticks = FALSE) piecepack_brandubh() piecepack_cribbage() piecepack_cribbage_board() piecepack_dara() piecepack_four_field_kono() piecepack_julgonu() piecepack_ludo() piecepack_nine_mens_morris(has_matchsticks = FALSE) piecepack_salta(has_subpack = FALSE) piecepack_seega() piecepack_tablan() piecepack_tablut(die_width = 0.63) piecepack_tic_tac_toe() piecepack_twelve_mens_morris(has_matchsticks = FALSE) piecepack_yote()piecepack_achi() piecepack_alquerque(has_matchsticks = FALSE) piecepack_awithlaknannai_mosona(has_matchsticks = FALSE) piecepack_backgammon() piecepack_baghchal(has_matchsticks = FALSE) piecepack_brandubh() piecepack_cribbage() piecepack_cribbage_board() piecepack_dara() piecepack_four_field_kono() piecepack_julgonu() piecepack_ludo() piecepack_nine_mens_morris(has_matchsticks = FALSE) piecepack_salta(has_subpack = FALSE) piecepack_seega() piecepack_tablan() piecepack_tablut(die_width = 0.63) piecepack_tic_tac_toe() piecepack_twelve_mens_morris(has_matchsticks = FALSE) piecepack_yote()
has_matchsticks |
Has matchsticks |
has_subpack |
Has a piecepack subpack |
die_width |
Width of dice |
Here are links for more information about the various other traditional games:
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- piecepack_four_field_kono() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }df <- piecepack_four_field_kono() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }
piecepack_coins() generates a data frame of piecepack coins.
piecepack_dice() generates a data frame of piecepack dice.
piecepack_matchsticks() generates a data frame of piecepack matchsticks.
piecepack_pawns() generates a data frame of piecepack pawns.
piecepack_pyramids() generates a data frame of piecepack pyramids.
piecepack_saucers() generates a data frame of piecepack saucers.
piecepack_tiles() generates a data frame of piecepack tiles.
piecepack_coins( ..., side = "face", piece_side = paste0("coin_", side), suit = rep(1:4, each = 6L), rank = rep.int(1:6, 4L), cfg = "piecepack", x = as.double(rep.int(1:6, 4L)), y = as.double(rep(4:1, each = 6L)), angle = 0, length.out = NA_integer_ ) piecepack_dice( ..., suit = 1:4, rank = 1L, cfg = "piecepack", x = as.double(1:4), y = 1, angle = 0, length.out = NA_integer_ ) piecepack_matchsticks( ..., side = "face", piece_side = paste0("matchstick_", side), suit = rep(1:4, each = 6L), rank = rep.int(1:6, 4L), cfg = "piecepack", x = as.double(rep.int(1:6, 4L)), y = 3 * rep(4:1, each = 6L), angle = 0, length.out = NA_integer_ ) piecepack_pawns( ..., side = "face", piece_side = paste0("pawn_", side), suit = 1:4, cfg = "piecepack", x = as.double(1:4), y = 1, angle = 0, length.out = NA_integer_ ) piecepack_pyramids( ..., side = "top", piece_side = paste0("pyramid_", side), suit = rep(1:4, each = 6L), rank = rep.int(1:6, 4L), cfg = "piecepack", x = as.double(rep.int(1:6, 4L)), y = as.double(rep(4:1, each = 6L)), angle = 0, length.out = NA_integer_ ) piecepack_saucers( ..., side = "face", piece_side = paste0("saucer_", side), suit = 1:4, cfg = "piecepack", x = as.double(1:4), y = 1, angle = 0, length.out = NA_integer_ ) piecepack_tiles( ..., side = "face", piece_side = paste0("tile_", side), suit = rep(1:4, each = 6L), rank = rep.int(1:6, 4L), cfg = "piecepack", x = 2 * rep.int(1:6, 4L), y = 2 * rep(4:1, each = 6L), angle = 0, length.out = NA_integer_ )piecepack_coins( ..., side = "face", piece_side = paste0("coin_", side), suit = rep(1:4, each = 6L), rank = rep.int(1:6, 4L), cfg = "piecepack", x = as.double(rep.int(1:6, 4L)), y = as.double(rep(4:1, each = 6L)), angle = 0, length.out = NA_integer_ ) piecepack_dice( ..., suit = 1:4, rank = 1L, cfg = "piecepack", x = as.double(1:4), y = 1, angle = 0, length.out = NA_integer_ ) piecepack_matchsticks( ..., side = "face", piece_side = paste0("matchstick_", side), suit = rep(1:4, each = 6L), rank = rep.int(1:6, 4L), cfg = "piecepack", x = as.double(rep.int(1:6, 4L)), y = 3 * rep(4:1, each = 6L), angle = 0, length.out = NA_integer_ ) piecepack_pawns( ..., side = "face", piece_side = paste0("pawn_", side), suit = 1:4, cfg = "piecepack", x = as.double(1:4), y = 1, angle = 0, length.out = NA_integer_ ) piecepack_pyramids( ..., side = "top", piece_side = paste0("pyramid_", side), suit = rep(1:4, each = 6L), rank = rep.int(1:6, 4L), cfg = "piecepack", x = as.double(rep.int(1:6, 4L)), y = as.double(rep(4:1, each = 6L)), angle = 0, length.out = NA_integer_ ) piecepack_saucers( ..., side = "face", piece_side = paste0("saucer_", side), suit = 1:4, cfg = "piecepack", x = as.double(1:4), y = 1, angle = 0, length.out = NA_integer_ ) piecepack_tiles( ..., side = "face", piece_side = paste0("tile_", side), suit = rep(1:4, each = 6L), rank = rep.int(1:6, 4L), cfg = "piecepack", x = 2 * rep.int(1:6, 4L), y = 2 * rep(4:1, each = 6L), angle = 0, length.out = NA_integer_ )
... |
Should be left empty. |
side |
Either "face" or "back". |
piece_side |
Either "tile_face" or "tile_back". |
suit |
Integer vector with values between |
rank |
Integer vector with values between |
cfg |
"piecepack" or perhaps "playing_cards_expansion", "dual_piecepacks_expansion", or "subpack". |
x, y
|
Cartesian coordinates (numeric vectors) |
angle |
Rotation of piece (numeric vector of degrees, counter-clockwise).
Will be coerced by |
length.out |
The number of pieces. Not needed if all the arguments are the same length (or of length one) and this length is the same as the number of desired pieces. |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df_coins <- piecepack_coins() df_dice <- piecepack_dice() df_pawns <- piecepack_pawns() df_pyramids <- piecepack_pyramids() df_saucers <- piecepack_saucers() df_tiles <- piecepack_tiles()df_coins <- piecepack_coins() df_dice <- piecepack_dice() df_pawns <- piecepack_pawns() df_pyramids <- piecepack_pyramids() df_saucers <- piecepack_saucers() df_tiles <- piecepack_tiles()
piecepack_preview() returns a data frame representing a preview layout of
the pieces in a standard piecepack set.
piecepack_preview(cfg = "piecepack")piecepack_preview(cfg = "piecepack")
cfg |
"piecepack" or perhaps "playing_cards_expansion", "dual_piecepacks_expansion", or "subpack". |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- piecepack_preview() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-2") { ppcli::cat_piece(df, annotate = TRUE) }df <- piecepack_preview() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-2") { ppcli::cat_piece(df, annotate = TRUE) }
These functions are defunct in this release of ppdf. Use the replacement function shown in the table below.
chess_angle(...) domino_angle(...) piecepack_angle(...) tarot_angle(...) alquerque_suit(...) checker_suit(...) chess_suit(...) go_suit(...) marble_suit(...) morris_suit(...) piecepack_suit(...) domino_rank(...) piecepack_rank(...) checkers_american_checkers(...) checkers_american_pool_checkers(...) checkers_board(...) checkers_brazilian_checkers(...) checkers_breakthrough(...) checkers_by_name(...) checkers_canadian_checkers(...) checkers_crossings(...) checkers_czech_checkers(...) checkers_checkers(...) checkers_dameo(...) checkers_english_checkers(...) checkers_focus(...) checkers_four_field_kono(...) checkers_frisian_checkers(...) checkers_gothic_checkers(...) checkers_grasshopper(...) checkers_international_checkers(...) checkers_italian_checkers(...) checkers_jamaican_checkers(...) checkers_julgonu(...) checkers_lines_of_action(...) checkers_none(...) checkers_portuguese_checkers(...) checkers_russian_checkers(...) checkers_spanish_checkers(...) checkers_thai_checkers(...) checkers_turkish_checkers(...) chess_by_name(...) dominoes_by_name(...) dominoes_concentration(...) dominoes_domino_finder(...) dominoes_domino_runners(...) dominoes_fujisan(...) dominoes_luzon(...) dominoes_none(...) dominoes_patience(...) dominoes_the_jubilee(...) dominoes_tiles(...) games_checkers(...) games_chess(...) games_dominoes(...) games_piecepack(...) games_stackpack(...) piecepack_by_name(...) piecepack_piecepack_accordion(...) piecepack_piecepack_halma(...) piecepack_piecepack_klondike(...) piecepack_rect_board_tiles(...) stackpack_by_name(...)chess_angle(...) domino_angle(...) piecepack_angle(...) tarot_angle(...) alquerque_suit(...) checker_suit(...) chess_suit(...) go_suit(...) marble_suit(...) morris_suit(...) piecepack_suit(...) domino_rank(...) piecepack_rank(...) checkers_american_checkers(...) checkers_american_pool_checkers(...) checkers_board(...) checkers_brazilian_checkers(...) checkers_breakthrough(...) checkers_by_name(...) checkers_canadian_checkers(...) checkers_crossings(...) checkers_czech_checkers(...) checkers_checkers(...) checkers_dameo(...) checkers_english_checkers(...) checkers_focus(...) checkers_four_field_kono(...) checkers_frisian_checkers(...) checkers_gothic_checkers(...) checkers_grasshopper(...) checkers_international_checkers(...) checkers_italian_checkers(...) checkers_jamaican_checkers(...) checkers_julgonu(...) checkers_lines_of_action(...) checkers_none(...) checkers_portuguese_checkers(...) checkers_russian_checkers(...) checkers_spanish_checkers(...) checkers_thai_checkers(...) checkers_turkish_checkers(...) chess_by_name(...) dominoes_by_name(...) dominoes_concentration(...) dominoes_domino_finder(...) dominoes_domino_runners(...) dominoes_fujisan(...) dominoes_luzon(...) dominoes_none(...) dominoes_patience(...) dominoes_the_jubilee(...) dominoes_tiles(...) games_checkers(...) games_chess(...) games_dominoes(...) games_piecepack(...) games_stackpack(...) piecepack_by_name(...) piecepack_piecepack_accordion(...) piecepack_piecepack_halma(...) piecepack_piecepack_klondike(...) piecepack_rect_board_tiles(...) stackpack_by_name(...)
... |
Ignored. |
| Defunct function | Replacement function |
checkers_by_name() |
checker_setup_by_name() |
chess_by_name() |
chess_setup_by_name() |
dominoes_by_name() |
domino_setup_by_name() |
dominoes_concentration() |
domino_concentration() |
dominoes_domino_finder() |
domino_finder() |
dominoes_domino_runners() |
domino_runners() |
dominoes_fujisan() |
domino_fujisan() |
dominoes_luzon() |
domino_luzon() |
dominoes_none() |
domino_none() |
dominoes_patience() |
domino_patience() |
dominoes_the_jubilee() |
domino_the_jubilee() |
dominoes_tiles() |
domino_tiles() |
games_checkers() |
checker_games() |
games_chess() |
chess_games() |
games_dominoes() |
domino_games() |
games_piecepack() |
piecepack_games() |
games_stackpack() |
stackpack_games() |
piecepack_by_name() |
piecepack_setup_by_name() |
piecepack_piecepack_accordion() |
piecepack_accordion() |
piecepack_piecepack_halma() |
piecepack_halma() |
piecepack_piecepack_klondike() |
piecepack_klondike() |
piecepack_rect_board_tiles() |
piecepack_rectangular_board() |
stackpack_by_name() |
stackpack_setup_by_name()
|
tibble data frames of setups for 2 reversi variants.
Data frame output can usually be plotted with pmap_piece(df, default.units = "in").
reversi_ming_mang(nrows = 8L, ncols = nrows) reversi_reversi(nrows = 8L, ncols = nrows)reversi_ming_mang(nrows = 8L, ncols = nrows) reversi_reversi(nrows = 8L, ncols = nrows)
nrows |
Number of rows in game board |
ncols |
Number of columns in game board |
Here are links for more information about the various games:
| Game | URL |
| Ming Mang | https://boardgamegeek.com/boardgame/40573/ming-mang |
| Reversi | https://en.wikipedia.org/wiki/Reversi |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- reversi_reversi() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }df <- reversi_reversi() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }
reversi_board() returns various reversi boards.
reversi_bits() returns reversi pieces.
reversi_board( nrows = 8L, ncols = nrows, x0 = 1, y0 = 1, ..., side = "face", piece_side = paste0("board_", side), suit = "black", angle = 0 ) reversi_bits( ..., side = "face", piece_side = paste0("bit_", side), suit = 1:6, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )reversi_board( nrows = 8L, ncols = nrows, x0 = 1, y0 = 1, ..., side = "face", piece_side = paste0("board_", side), suit = "black", angle = 0 ) reversi_bits( ..., side = "face", piece_side = paste0("bit_", side), suit = 1:6, x = as.double(1:6), y = 1, angle = 0, length.out = NA_integer_ )
nrows |
Number of rows in game board |
ncols |
Number of columns in game board |
x0 |
X coordinate for the center of the first point |
y0 |
Y coordinate for the center of the first point |
... |
Should be left empty. |
side |
Either "face" or "back" |
piece_side |
If |
suit |
Suit value (color) of board/bit.
|
angle |
Angle of board in degrees. |
x, y
|
Cartesian coordinates (numeric vectors) |
length.out |
The number of pieces. Not needed if all the arguments are the same length (or of length one) and this length is the same as the number of desired pieces. |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
dfb <- reversi_board() dfp <- reversi_bits(suit = c("black", "white"), x = c(4, 5), y = c(4, 4)) df <- rbind(dfb, dfp) if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }dfb <- reversi_board() dfp <- reversi_bits(suit = c("black", "white"), x = c(4, 5), y = c(4, 4)) df <- rbind(dfb, dfp) if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }
setup_by_name() returns setup data frames by game name and game system.
alquerque_setup_by_name(), checker_setup_by_name(), chess_setup_by_name(),
dominoes_setup_by_name(), marble_setup_by_name(), piecepack_setup_by_name()
and stackpack_setup_by_name() are aliases that set the game system.
setup_by_name( name, system = known_game_systems, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) alquerque_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) checker_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) chess_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) domino_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) go_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) marble_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) morris_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) piecepack_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) reversi_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) stackpack_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) tarot_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) )setup_by_name( name, system = known_game_systems, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) alquerque_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) checker_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) chess_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) domino_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) go_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) marble_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) morris_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) piecepack_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) reversi_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) stackpack_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) ) tarot_setup_by_name( name, ..., getter = function(x) get(x, envir = getNamespace("ppdf")) )
name |
Game name. Will be normalized by |
system |
Game system. |
... |
Additional arguments to pass to the underlying setup function. |
getter |
Function with a single function name argument to use.
By default will just look for functions in this package but
a developer may want to consider |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- chess_setup_by_name("chess") if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }df <- chess_setup_by_name("chess") if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }
alquerque_none(), checker_none(), chess_none(), domino_none(),
go_none(), marble_none(), piecepack_none(), and stackpack_none() return zero-row data frames.
alquerque_none() checker_none() chess_none() domino_none() go_none() marble_none() morris_none() piecepack_none() reversi_none() stackpack_none() tarot_none()alquerque_none() checker_none() chess_none() domino_none() go_none() marble_none() morris_none() piecepack_none() reversi_none() stackpack_none() tarot_none()
A data frame with zero rows.
checker_none()checker_none()
tibble data frames of setups for 10 other games playable with a piecepack stackpack.
Data frame output can usually be plotted with pmap_piece(df, default.units = "in").
stackpack_alice_chess(max_tiles = 24L) stackpack_baroque_chess() stackpack_chaturaji() stackpack_chess() stackpack_chess960(..., seed = NULL) stackpack_fischer_random_chess(..., seed = NULL) stackpack_chinese_chess() stackpack_four_seasons_chess() stackpack_horde_chess() stackpack_international_chess() stackpack_japanese_chess() stackpack_salta() stackpack_shogi() stackpack_ultima() stackpack_xiangqi()stackpack_alice_chess(max_tiles = 24L) stackpack_baroque_chess() stackpack_chaturaji() stackpack_chess() stackpack_chess960(..., seed = NULL) stackpack_fischer_random_chess(..., seed = NULL) stackpack_chinese_chess() stackpack_four_seasons_chess() stackpack_horde_chess() stackpack_international_chess() stackpack_japanese_chess() stackpack_salta() stackpack_shogi() stackpack_ultima() stackpack_xiangqi()
max_tiles |
Maximum number of (piecepack) tiles available to build boards |
... |
Should be left empty. |
seed |
Seed that determines setup, either an integer or |
Here are links for more information about the games:
| Game | URL |
| Alice Chess | https://en.wikipedia.org/wiki/Alice_chess |
| Chaturaji | https://www.ludism.org/ppwiki/Chaturaji |
| Fischer Random Chess AKA Chess960 | https://www.chessvariants.com/diffsetup.dir/fischer.html |
| Four Seasons Chess | https://www.chessvariants.com/historic.dir/4seiz.html |
| Horde Chess | https://lichess.org/variant/horde |
| (International) Chess | https://www.ludism.org/ppwiki/Chess |
| Salta | https://en.wikipedia.org/wiki/Salta_(game) |
| Shogi aka Japanese Chess | https://www.ludism.org/ppwiki/Shogi |
| Ultima aka Baroque Chess | https://en.wikipedia.org/wiki/Baroque_chess |
| Xiangqi AKA Chinese Chess | https://www.ludism.org/ppwiki/Xiangqi |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- stackpack_chess() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }df <- stackpack_chess() if (requireNamespace("ppcli", quietly = TRUE) && packageVersion("ppcli") >= "0.3.0-1") { ppcli::cat_piece(df, annotate = TRUE) }
tarot_cards() returns tarot cards.
tarot_cards( ..., side = "face", piece_side = paste0("card_", side), suit = rep(1:4, each = 13L), rank = rep.int(c(1:11, 13:14), 4L), x = 2.5 * rep.int(1:13, 4L), y = 3.5 * rep(4:1, each = 13L), angle = 0, length.out = NA_integer_ )tarot_cards( ..., side = "face", piece_side = paste0("card_", side), suit = rep(1:4, each = 13L), rank = rep.int(c(1:11, 13:14), 4L), x = 2.5 * rep.int(1:13, 4L), y = 3.5 * rep(4:1, each = 13L), angle = 0, length.out = NA_integer_ )
... |
Should be left empty. |
side |
Either "face" or "back". |
piece_side |
Either "tile_face" or "tile_back". |
suit |
Suit value of cards.
|
rank |
Rank value of cards.
Normal suits are from |
x, y
|
Cartesian coordinates (numeric vectors) |
angle |
Rotation of piece (numeric vector of degrees, counter-clockwise).
Will be coerced by |
length.out |
The number of pieces. Not needed if all the arguments are the same length (or of length one) and this length is the same as the number of desired pieces. |
A tibble::tibble() data frame with the following columns:
"piece_side"
"suit"
"rank"
"cfg" (optional, defaults to "piecepack")
"x"
"y"
"angle" (optional, defaults to 0).
This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().
df <- tarot_cards(suit = "clubs", rank = "nine", x = 1.5, y = 2) if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-1" && piecepackr:::device_supports_unicode()) { grid::grid.newpage() envir = game_systems() pmap_piece(df, envir = envir, default.units = "in") }df <- tarot_cards(suit = "clubs", rank = "nine", x = 1.5, y = 2) if (require("piecepackr", quietly = TRUE) && packageVersion("piecepackr") >= "1.15.0-1" && piecepackr:::device_supports_unicode()) { grid::grid.newpage() envir = game_systems() pmap_piece(df, envir = envir, default.units = "in") }