print_board | R Documentation |
Prints a chessboard with the rows arranged bottom to top.
print_board(board, pov = "white")
board |
An 8x8 matrix representing a chessboard. See
|
pov |
(Default = 'white') A string indicating which side's point of view should be shown. Allowed values are 'black' and 'white'. |
The conventional orientation of a 2-D chessboard places row 1 at
the bottom from white's point of view. R's print()
function prints matrices
with row 1 at the top, causing chessboard rows to appear in reverse order,
resulting in a mirror image of the board. The print_board()
function simply
a wrapper for print()
that modifies the board before printing to give a
true image of the board.
Prints a chessboard in the correct orientation.
board <- fen_to_board()$board
print_board(board)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.