Skip to contents

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").

Usage

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()

Arguments

seed

Seed that determines setup, either an integer or NULL

coins

String of coin layout

nrows

Number of rows (and columns) in game board.

variant

Name of variant.

Value

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().

Examples

df <- piecepack_dao()
if (requireNamespace("ppcli", quietly = TRUE) &&
    packageVersion("ppcli") >= "0.3.0-1") {
  ppcli::cat_piece(df, annotate = TRUE)
}
#>  ┌─┰─┬─┰─┐
#> 4│☀⃝┃ │ ┃☾⃝│
#>  ┝━╋━┿━╋━┥
#> 3│ ┃☀⃝│☾⃝┃ │
#>  ├─╂─┼─╂─┤
#> 2│ ┃☾⃝│☀⃝┃ │
#>  ┝━╋━┿━╋━┥
#> 1│☾⃝┃ │ ┃☀⃝
#>  └─┸─┴─┸─┘
#>   a b c d