Closed thewhisperinyourears closed 3 years ago
To handle full chess games you have to use chess-console https://github.com/shaack/chess-console, which uses cm-chessboard and can manage whole games with promotion, history, sound, etc. You can see a working example here: https://www.chessmail.de/pages/chess-computer.html
cm-chessboard is just a control to show and input chess moves and positions, it does not open dialogs, to keep it simple.
I looked into chess console and is quite good. But i noticed the bootstrap dependency and i am trying to avoid dependencies as much as i can. Can the CM board be modified to support promotion?
cm-chessboard has no chess rules implemented, you have to use other tools for this like chess.js or my ES6 version cm-chess. Look at the example "Input enabled, move validation with chess.js" https://shaack.com/projekte/cm-chessboard/examples/validate-moves.html
A simple promotion logic can be coded using the inputHandler callback.
CM board does not handle promotions?