From: Benjamin Auder Date: Tue, 25 Jul 2023 17:21:48 +0000 (+0200) Subject: Fix Chaining variant X-Git-Url: https://git.auder.net/js/doc/assets/img/current/index.css?a=commitdiff_plain;h=24a6312db06bd3632ff702389c3712f77d01046d;p=xogo.git Fix Chaining variant --- diff --git a/variants/Chaining/class.js b/variants/Chaining/class.js index 5cd4c1d..9d771da 100644 --- a/variants/Chaining/class.js +++ b/variants/Chaining/class.js @@ -75,6 +75,7 @@ export default class ChainingRules extends ChessRules { ); } mv.chained = destPiece; //easier (no need to detect it) +// mv.drag = {c: this.turn, p: initPiece}; //TODO: doesn't work return mv; } @@ -103,7 +104,7 @@ export default class ChainingRules extends ChessRules { postPlay(move) { super.postPlay(move); - if (!!move.converted) { + if (!!move.chained) { this.lastMoveEnd.push({ x: move.end.x, y: move.end.y, diff --git a/variants/Convert/class.js b/variants/Convert/class.js index 37c2c3d..bc99c63 100644 --- a/variants/Convert/class.js +++ b/variants/Convert/class.js @@ -76,6 +76,7 @@ export default class ConvertRules extends ChessRules { ); } mv.converted = destPiece; //easier (no need to detect it) +// mv.drag = {c: this.turn, p: initPiece}; //TODO: doesn't work return mv; }