Skip to contents

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.

Usage

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
)

Arguments

...

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

rank

Vector of rank values to use for tile back (will be repeated and coerced by piece_rank()).

cfg

"piecepack" or perhaps "playing_cards_expansion", "dual_piecepacks_expansion", or "subpack".

x0

X coordinate for the center of the first cell/point for piecepack_rectangular_board(). X coordinate for center of bottom-left tile for piecepack_donut_board().

y0

Y coordinate for the center of the first cell/point for piecepack_rectangular_board(). Y coordinate for center of bottom-left tile for piecepack_donut_board().

angle

Rotation of piece (numeric vector of degrees, counter-clockwise). Will be coerced by piece_angle().

nrows

Number of rows in game board

ncols

Number of columns in game board

max_tiles

Maximum number of tiles that can be used

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