Nothing
#' @title takeback
#'
#' @description takeback
#'
#' @param game chess game object (i.e., a list with elements board, turn, history, and fen_history
#' as created by newgame function)
#'
#' @return game (last move being deleted)
#' @export
takeback <- function(game) {
game$fen_history <- game$fen_history[-length(game$fen_history)]
game$board <- readfen(game$fen_history[length(game$fen_history)])$board
game$history <- game$history[-length(game$history)]
game$turn <- ifelse(length(game$history)%%2 == 0, 1, -1)
game
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.