upgrade chessground, enable autoCastle in round

This commit is contained in:
Thibault Duplessis 2015-01-06 22:43:06 +01:00
parent 4372eab85f
commit 412f1df6a6
9 changed files with 10 additions and 9 deletions

File diff suppressed because one or more lines are too long

View file

@ -30,7 +30,7 @@
"watchify": "^1.0.2"
},
"dependencies": {
"chessground": "1.8.7",
"chessground": "1.8.10",
"chessli.js": "file:../chessli",
"game": "file:../game",
"lodash-node": "^2.4.1",

View file

@ -30,7 +30,7 @@
"watchify": "^1.0.2"
},
"dependencies": {
"chessground": "1.8.7",
"chessground": "1.8.10",
"lodash-node": "^2.4.1",
"mithril": "0.1.28"
}

View file

@ -30,7 +30,7 @@
"watchify": "^1.0.2"
},
"dependencies": {
"chessground": "1.8.7",
"chessground": "1.8.10",
"lodash-node": "^2.4.1",
"mithril": "0.1.28"
}

View file

@ -30,7 +30,7 @@
"watchify": "^1.0.2"
},
"dependencies": {
"chessground": "1.8.7",
"chessground": "1.8.10",
"chessli.js": "file:../chessli",
"lodash-node": "^2.4.1",
"merge": "^1.2.0",

View file

@ -30,7 +30,7 @@
"watchify": "^1.0.2"
},
"dependencies": {
"chessground": "1.8.7",
"chessground": "1.8.10",
"chessli.js": "file:../chessli",
"game": "file:../game",
"lodash-node": "^2.4.1",

View file

@ -14,6 +14,7 @@ function makeConfig(data, fen, flip) {
lastMove: str2move(data.game.lastMove),
check: data.game.check,
coordinates: data.pref.coords !== 0,
autoCastle: data.game.variant.key === 'standard',
highlight: {
lastMove: data.pref.highlight,
check: data.pref.highlight,

View file

@ -32,7 +32,7 @@ module.exports = function(send, ctrl) {
ctrl.chessground.playPremove();
},
castling: function(o) {
if (ctrl.replay.active) return;
if (ctrl.replay.active || ctrl.chessground.data.autoCastle) return;
var pieces = {};
pieces[o.king[0]] = null;
pieces[o.rook[0]] = null;

View file

@ -30,7 +30,7 @@
},
"dependencies": {
"game": "file:../game",
"chessground": "1.8.7",
"chessground": "1.8.10",
"lodash-node": "^2.4.1",
"mithril": "0.1.28"
}