tarot_cards() returns tarot cards.
Arguments
- ...
Should be left empty.
- side
Either "face" or "back".
- piece_side
Either "tile_face" or "tile_back".
- suit
Suit value of cards.
1Lis "hearts",2Lis "spades",3Lis "clubs",4Lis "diamonds", and5Lis "trumps". Will be coerced bytarot_suit().- rank
Rank value of cards. Normal suits are from
1L(ace) to14L(king) plus a15Ljoker. Trump suits are from1Lto21Lplus a22Lfool/excuse. Will be coerced bytarot_rank().- 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
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")
}