library("piecepackr")
cfg <- pp_cfg(list(shape.tile="convex6", border_lex=3,
shape_t.tile="60", dm_t.tile_face=-90,
width.tile=4/sqrt(3), height.tile=4/sqrt(3),
shape.coin="convex3", invert_colors.suited=TRUE))
g.p <- function(...) {
grid.piece(..., cfg=cfg, default.units="in")
}
x0 <- 5
y0 <- 4.5
g.p("tile_back", x=x0, y=y0)
theta <- seq(90, by=-60, length.out=6)
r <- 0.7
g.p("coin_face", rank=1:6,
x=x0+to_x(theta,r),
y=y0+to_y(theta,r),
angle=theta+90)
r <- 2
g.p("tile_face", suit=1:6%%4+1, rank=1:6,
x=x0+to_x(theta,r),
y=y0+to_y(theta,r),
angle=theta+-90)
r <- 6/sqrt(3)
g.p("tile_back",
x=x0+to_x(theta+30, r),
y=y0+to_y(theta+30, r))