chess_move | R Documentation |
Takes in input a move, evaluates whether it is legal, and if it is, then the game is updated
chess_move(game, piece, initialposition = "", finalposition = "")
game |
chess game object (i.e., a list with elements board, turn, history, and fen_history as created by newgame function) |
piece |
letter indicating the piece to be moved (p, N, B, R, Q, K) |
initialposition |
initial square of the piece |
finalposition |
destination square |
makes move
newgame() |>
chess_move("N", "g1", "f3")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.