jchess
jchess copied to clipboard
add some key features
Hello,
Maybe it could be great if your plugin will have some standard features of other pgn players:
- variants support
- button binding to start of the game
- button binding to end of the game
For variant support, you could do as you want. For start/end buttons binding, maybe adding some logic when you parse the pgn data to extract fen end chessboard position and store it.
Going through something like below works but is not really efficient: [code] $('.end', container).click(function() { while(chess.game.halfmove_number < chess.game.transitions.length) { chess.transitionForward(); } $('.annot', container).text( chess.annotation() ); return false; }); [/code]