chess: chess pieces

Description Usage Arguments Examples

Description

Functions to create Unicode chess pieces and export them to HTML

Usage

1
2
3
4
5
6
pieces_list()

chess_unicode(piece = pieces_list(), color = c("white", "black"))

chess_html(piece = pieces_list(), color = c("white", "black"),
  size = 172)

Arguments

piece

a chess piece. Valid values can be found via pieces_list()

color

the color of the chess pieces. Valid values are white and black

size

the font-size to use

Examples

1
2
3
4
5
6
7
8
cat(chess_unicode("k"))

chess_html("r")
chess_html("n", color = "black")

white <- pieces_list() %>% lapply(chess_html, color = "white")
black <- pieces_list() %>% lapply(chess_html, color = "black")
span(div(white), div(black)) %>% browsable()

r-webutils/suitr documentation built on Dec. 23, 2021, 12:18 a.m.