This is a simple implementation of the classic board game. It supports all possible moves, including castling, and en passant.
} /> : null ); } /* Board class can't (always) include a settings button if used as a demo. */ render() { const checkMsg = this.whoInCheck() ? "Check! " : ""; const isCheckmate = this.checkmate(); const namedPlayer = isCheckmate ? !this.state.blackIsNext : this.state.blackIsNext const color = namedPlayer ? 'Black' : 'White'; const status = isCheckmate ? "Checkmate! " + color + " Wins!" : checkMsg + color + "'s Turn"; return (