R/newgame.R

Defines functions newgame

Documented in newgame

#' @title newgame
#'
#' @description sets up a new chess game
#'
#' @return new game
#' @export


newgame <- function(){
  list(board = chess2plyrs::chesstools$init,
       turn = 1,
       history = c(),
       fen_history = c("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w"))
}

Try the chess2plyrs package in your browser

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

chess2plyrs documentation built on June 8, 2025, 10:03 a.m.