Cribbage is a popular two-person card game that usually requires a special cribbage board to keep score. Below is a diagram of using a piecepack to make an effective cribbage board.
library("grid")
library("piecepackr")
library("ppdf")
cfg <- pp_cfg(list(suit_color="darkred,black,darkgreen,darkblue,black",
border_color="black", border_lex=4))
pmap_piece(piecepack_cribbage_board(), cfg=cfg, default.units="in")
textGrob_cribbage_board <- function(suit_colors = rep("black", 4)) {
gp1 <- gpar(col = c(suit_colors[1], suit_colors[2]), fontsize = 32)
gp2 <- gpar(col = c(suit_colors[3], suit_colors[4]), fontsize = 32)
grobTree(textGrob(1:30, x = 0.5, y = 3:32, default.units = "in", gp = gp1),
textGrob(31:60, x = 3.5, y = 32:3, default.units = "in", gp = gp1),
textGrob(1:30, x = 5.5, y = 3:32, default.units = "in", gp = gp2),
textGrob(31:60, x = 8.5, y = 32:3, default.units = "in", gp = gp2)
)
}
grid.draw(textGrob_cribbage_board(cfg$get_suit_color()))
Using a piecepack as a Cribbage Board