Start using Chess.js.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 20 Nov 2014 20:02:59 +0000 (21:02 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 20 Nov 2014 20:13:53 +0000 (21:13 +0100)
commit181097241ea4fe24cbea99a0a92736e39704e4a6
tree80842ac0f283a71791b8567061ee0d75f6d0470c
parentedec6246eb5958f6b547bf7bb7fe30d7e1aa9bcf
Start using Chess.js.

The main motivation for importing yet another library (thankfully
it's not that big; 17 kB pre-gzip should be livable) is to get
accurate FENs for history support later. However, right now we
grab the following two nice side effects:

 - We don't have to maintain our own castling and en passant logic
   anymore.
 - We don't have to send both UCI and prettyprinted moves over,
   reducing the JSON size by something like 40% (I haven't checked
   post-gzip, though). Currently we just send the UCI, but maybe
   it should be reversed; we need to check if this causes problems
   for CPU usage or something during normal updates, and which one
   compresses better..
remoteglot.pl
www/index.html
www/js/chess.min.js [new file with mode: 0644]
www/js/remoteglot.js