demo/load-pgn-ex.R

pgn <- system.file("extdata/pgn/kasparov_vs_topalov.pgn", package = "rchess")
pgn <- readLines(pgn, warn = FALSE)
pgn <- paste(pgn, collapse = "\n")
cat(pgn)

chsspgn <- Chess$new()

chsspgn$load_pgn(pgn)

chsspgn$history_detail()

chsspgn$history_detail() %>% filter(!is.na(status))

Try the rchess package in your browser

Any scripts or data that you put into this service are public.

rchess documentation built on May 2, 2019, 7:25 a.m.