game: Create a new game

Description Usage Arguments Value

View source: R/game.R

Description

A game is a tree with nodes, where each node represents the board after a move and each branch represents a variation of the game (not to be confused with a variant of chess). This tree mirrors the PGN of the game.

To explore a game, an object of this class supports print(), plot(), str(), fen(), pgn() and more.

Usage

1
game(headers = NULL, fen = NULL)

Arguments

headers

A named list like list("Header1" = "Value1", ...)

fen

FEN representing the starting position of the board

Value

A game root node


curso-r/chess documentation built on Dec. 19, 2021, 7:04 p.m.