return true; //self captures induce chaining
}
- setOtherVariables(fenParsed, pieceArray) {
- super.setOtherVariables(fenParsed, pieceArray);
+ setOtherVariables(fenParsed) {
+ super.setOtherVariables(fenParsed);
// Stack of "last move" only for intermediate chaining
this.lastMoveEnd = [];
}
);
}
mv.chained = destPiece; //easier (no need to detect it)
+// mv.drag = {c: this.turn, p: initPiece}; //TODO: doesn't work
return mv;
}
postPlay(move) {
super.postPlay(move);
- if (!!move.converted) {
+ if (!!move.chained) {
this.lastMoveEnd.push({
x: move.end.x,
y: move.end.y,