add_piece: Add a piece to the current plot

Description Usage Arguments Examples

View source: R/add_piece.R

Description

Add a piece to the current plot

Usage

1
add_piece(piece, square, perspective = "w", piece_scale = 0.825)

Arguments

piece

piece symbol in FEN notation ("P" = white pawn etc...)

square

Square to draw piece on

perspective

Board perspective for the added piece (needs to be set to the same as persepctive used with plot_fen())

piece_scale

Piece scaling factor (default = 0.825)

Examples

1
2
3
4
# Draw empty board and add some pieces
plot_fen("8/8/8/8/8/8/8/8 w KQkq - 0 1") +
  add_piece("q", "c3") +
  add_piece("B", "h8")

cj-holmes/ggambit documentation built on July 22, 2021, 12:56 p.m.