Figuren bewegen

 

 

JavaScript

var board = new ChessBoard('board', 'start');

$('#startPositionBtn').on('click', board.start);

$('#move1Btn').on('click', function() {
  board.move('e2-e4');
});

$('#move2Btn').on('click', function() {
  board.move('d2-d4', 'g8-f6');
});

HTML

<div id="board" style="width: 400px"></div>
<input type="button" id="startPositionBtn" value="Start Position" />
<input type="button" id="move1Btn" value="e2-e4" />
<input type="button" id="move2Btn" value="d2-d4, g8-f6" />