Fork me on GitHub

Orthodox PnP

For a number of reasons the default piecepack made by piecepackr does not comply with the Anatomy of a Piecepack standard. But not to fear - one can easily configure a piecepack that looks like one of the original piecepacks.

library("piecepackr")
piecepack_suits <- list(suit_text="\U0001f31e,\U0001f31c,\U0001f451,\u269c,\uaa5c", # 🌞,🌜,👑,⚜,꩜
                        suit_fontfamily="Noto Emoji,Noto Sans Symbols2,Noto Emoji,Noto Sans Symbols,Noto Sans Cham",
                        suit_cex="0.6,0.7,0.75,0.9,0.9")
dark_colorscheme <- list(suit_color="darkred,black,darkgreen,darkblue,black",
                         border_color="black")
orthodox_ranks <- list(rank_text=",\uaa5c,2,3,4,5", use_suit_as_ace=TRUE,
                       rank_fontfamily="Noto Sans",
                       rank_fontfamily.r2="Noto Sans Cham", rank_cex.r2.matchstick=0.7)
saucer <- list(suit_text.saucer_face = "", suit_text.saucer_back = "",
              dm_text.saucer = "|", dm_fontfamily.saucer = "Noto Sans",
              dm_r.saucer = 0.42, dm_color.saucer = "black",
              invert_colors.saucer_face = TRUE,
              mat_width.saucer_face=0.3, mat_color.saucer="white",
              width.saucer = 7/8, height.saucer=7/8)
coin <- list(dm_text.coin = "|",
              dm_fontfamily.coin = "Noto Sans",
              dm_r.coin = 0.42,
              dm_color.coin = "black")
die <- list(dm_text.die = "")
pawn <- list(suit_text.pawn = "",
          dm_text.pawn = "",
          invert_colors.pawn = TRUE)
pyramids <- list(rank_text.pyramid="A,B,C,D,E,F", use_suit_as_ace.pyramid=FALSE,
                 dm_t.pyramid_face=270, dm_r.pyramid_face=0.28, dm_cex.pyramid_face=3.5,
                 dm_text.pyramid_face = "|", dm_fontfamily.pyramid_face = "Noto Sans",
                 dm_color.pyramid_face="black", ps_color.pyramid_left = "black",
                 ps_color.pyramid_right = "black",
                 ps_t.pyramid_face=90, ps_r.pyramid_face=0.07, ps_cex.pyramid_face=0.4)
matchsticks <- list(invert_colors.matchstick=TRUE, use_suit_as_ace.matchstick=FALSE,
                    dm_r.r1.matchstick=0)
orthodox1 <- c(piecepack_suits, dark_colorscheme, orthodox_ranks, saucer, coin,
               die, pawn, pyramids, matchsticks)
noto_credit <- c("\u25cf This piecepack uses characters from Google Noto Fonts. OFL 1.1.",
                 "\thttps://www.google.com/get/noto/")
description <- "This 'orthodox' piecepack fully complies with the 'Anatomy of a Piecepack' standard"
orthodox1$description <- description
orthodox1$credit <- noto_credit
orthodox1$title <- "Orthodox piecepack (Green Crowns)"
orthodox1 <- pp_cfg(orthodox1)
grid.piece("preview_layout", cfg=orthodox1)
A preview of an 'orthodox' piecepack made by piecepackr

A preview of an 'orthodox' piecepack made by piecepackr

orthodox2 <- as.list(orthodox1)
orthodox2$suit_color="darkred,black,gold,darkblue,black"
orthodox2$title <- "Orthodox piecepack (Gold Crowns)"
orthodox2 <- pp_cfg(orthodox2)
grid.piece("preview_layout", cfg=orthodox2)
An 'orthodox' piecepack with gold crowns

An 'orthodox' piecepack with gold crowns

orthodox3 <- as.list(orthodox1)
orthodox3$suit_text <- "♥,♠,♣,♦,\uaa5c"
orthodox3$suit_cex <- "1,1,1,1,0.9"
orthodox3$suit_color <- "darkred,black,black,darkred,black"
orthodox3$suit_fontfamily <- "Noto Sans Symbols"
orthodox3$suit_fontfamily.s5 <- "Noto Sans Cham"
orthodox3$suit_text.pawn = NULL
orthodox3$suit_cex.pawn = 0.5
orthodox3$suit_text.saucer_face = NULL
orthodox3$suit_cex.saucer_face <- 0.5
orthodox3$title <- "French-suited piecepack (Orthodox)"
orthodox3$description <- NULL
orthodox3 <- pp_cfg(orthodox3)
grid.piece("preview_layout", cfg=orthodox3)
French-suited piecepack in an orthodox style

French-suited piecepack in an orthodox style

Comments


There are no comments yet.

Add a Comment

You can use Markdown or restructuredText to format your comment.

links

social