Plot game move
Usage
plot_move(
game,
file = NULL,
move = NULL,
annotate = TRUE,
...,
.f = piecepackr::grid.piece,
cfg = NULL,
envir = NULL,
width = NULL,
height = NULL,
ppi = 72,
bg = "white",
new_device = TRUE,
annotation_scale = NULL
)Arguments
- game
A list containing a parsed ppn game (as parsed by
read_ppn())- file
Filename to save animation unless
NULLin which case it uses the current graphics device.- move
Which move to plot game state (after the move, will use
game$dfs[[move]]) unlessNULLin which case will plot the game state after the last move.- annotate
If
TRUEor"algebraic"annotate the plot with “algrebraic” coordinates, ifFALSEor"none"don't annotate, if"cartesian"annotate the plot with “cartesian” coordinates.- ...
Passed to
piecepackr::render_piece()- .f
Low level graphics function to use e.g.
grid.piece(),piece3d(),piece(), orpiece_mesh().- cfg
A piecepackr configuration list
- envir
Environment (or named list) of piecepackr configuration lists
- width
Width of animation (in inches). Inferred by default.
- height
Height of animation (in inches). Inferred by default.
- ppi
Resolution of animation in pixels per inch. By default set so image max 600 pixels wide or tall.
- bg
Background color (
"transparent")for transparent- new_device
If
fileisNULLshould we open up a new graphics device?- annotation_scale
Multiplicative factor that scales (stretches) any annotation coordinates. By default uses
attr(df, "scale_factor") %||% 1.