Description Usage Arguments Value Author(s)
Given a board state and a piece location and its desired new location, updates the board state. Note that if the piece is not found in its start_square, the board is not updated.
1 | move_piece(board, start_square, end_square)
|
board |
A 12 by 64 board binary matrix. |
start_square |
A valid square name, from "a1" to "h8", containing the piece to-be-moved current location. |
end_square |
The A valid square name, from "a1" to "h8", containing the piece to-be-moved desired new location. |
An updated board if the move is valid, or the same board if not.
Eduardo Kapp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.