pbuk
Science Advisor
Homework Helper
Gold Member
- 4,970
- 3,220
Sorry no time to do something custom but here is an example of what can be easily achieved:
https://chessboardjs.com/examples/3004
Note that the only code that has been written to achieve that is what follows, everything else is in the libraries.
https://chessboardjs.com/examples/3004
Note that the only code that has been written to achieve that is what follows, everything else is in the libraries.
JavaScript:
var board = Chessboard('myBoard', 'start')
$('#move1Btn').on('click', function () {
board.move('e2-e4')
})
$('#move2Btn').on('click', function () {
board.move('d2-d4', 'g8-f6')
})
$('#startPositionBtn').on('click', board.start)