meeple_bits() returns meeples.
Arguments
- ...
Should be left empty.
- side
Either "face" or "back".
- piece_side
Either "tile_face" or "tile_back".
- suit
Suit value (color) of meeples.
1Lis "red",2Lis "black",3Lis "green",4Lis "blue",5Lis "yellow", and6Lis "white". Will be coerced bypiece_suit().- x, y
Cartesian coordinates (numeric vectors)
- angle
Rotation of piece (numeric vector of degrees, counter-clockwise). Will be coerced by
piece_angle().- 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.
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
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)
}