The JavaScript Chessboard
Did you ever wish you had a chessboard on your computer with pieces that you could move?
Now you do.
Drag the pieces to move them. Go backward or forward by pressing “move back” or “move forward.”
The move history saves certain move sequences as one move.
• Move captured pieces off the board immediately after capture.
• Exchange the pawn for its replacement immediately after pawn promotion.
• To castle, move the king first, then the rook.
While a move sequence is in progress, it will be indicated after the move number.
The move history ignores non-moves and rearranging pieces off the board. Use the “move back” function to undo erroneous moves.
Check “board setup” to stop recording history while setting up a board position. Then use “reset history,” and “b/w” to change color, if needed.
The extra pieces are for pawn promotion.
Moves are recorded as reversible algebraic notation in the text area on the left, and Forsyth–Edwards notation in the string below the controls: the piece positions in rows, with numbers indicating blank spaces; which color to move; castling ability; en passant target, if any; half-moves since the last capture or pawn move; and the move number.
To play Chess960 (Fischer Random Chess), press “generate” to randomly set up a position. Or, arrange the white pieces and press “read.” The setup procedure:
• Place the bishops on different colors.
• Place the queen and nights.
• Place the king between the rooks.
The Forsyth–Edwards notation is modified in Chess960 to Shredder-FEN: to resolve ambiguity, castling ability is indicated by the files of the rooks rather than “K” and “Q.” Also, as in X-FEN, only “real” en passant targets, with an enemy pawn in position, are recorded.
• In Chess960, castling may require moving only the king, or moving it to the square occupied by the rook. In these cases, begin the move sequence by moving the king to the spot off the board beside its target square.