fix chess960 castling

This commit is contained in:
Thibault Duplessis 2014-10-20 00:58:52 +02:00
parent 8bbee1c8f5
commit 78e15cea8d

View file

@ -33,11 +33,11 @@ module.exports = function(send, ctrl) {
castling: function(o) {
var pieces = {};
pieces[o.king[0]] = null;
pieces[o.rook[0]] = null;
pieces[o.king[1]] = {
role: 'king',
color: o.color
};
pieces[o.rook[0]] = null;
pieces[o.rook[1]] = {
role: 'rook',
color: o.color