view_game: View/edit game

View source: R/view_game.R

view_gameR Documentation

View/edit game

Description

Launch PPN game viewer/editor

Usage

view_game(
  game,
  shiny = FALSE,
  ...,
  editor = getOption("editor"),
  reorient = "none",
  annotate = FALSE,
  fps = 1
)

Arguments

game

A list containing a parsed ppn game (as parsed by read_ppn)

shiny

If TRUE launch a shiny PPN viewer in a browser instead of command-line viewer.

...

Passed to plot_move().

editor

usually a character string naming (or giving the path to) the text editor you want to use.

reorient

Determines whether and how we should reorient (the angle) of pieces or symbols:

  1. The default "none" (or FALSE) means don't reorient any pieces/symbols.

  2. "all" (or TRUE) means setting the angle to zero for all pieces (reorienting them all “up”).

  3. "symbols" means just re-orient suit/rank symbols but not the orientation of the piece itself. In particular, in contrast with "all" this preserves the location of the upper-left "corner" of piecepack tile faces.

annotate

If TRUE or "algebraic" annotate the plot with “algrebraic” coordinates, if FALSE or "none" don't annotate, if "cartesian" annotate the plot with “cartesian” coordinates.

fps

Frames per second. Passed to cat_game().


piecepackr/ppgames documentation built on Jan. 17, 2025, 2:24 p.m.