X-Git-Url: https://git.auder.net/?p=xogo.git;a=blobdiff_plain;f=base_rules.js;h=a2cb95169f38767d837c4b7696c6d654915a6800;hp=e7d58b26ebfa2c5b7470ea13cf4213cf4cf7bbae;hb=639afc982f9c3be3b4748ef10e8ef771a295712f;hpb=449d72e350051d3ddb86a360c7bb4a4327cbeb75 diff --git a/base_rules.js b/base_rules.js index e7d58b2..a2cb951 100644 --- a/base_rules.js +++ b/base_rules.js @@ -1347,6 +1347,8 @@ export default class ChessRules { }); } +// TODO: pawnfall + Cannibal issues + pawnPostProcess(moves, color, oppCol) { let moreMoves = []; const lastRank = (color == "w" ? 0 : this.size.x - 1); @@ -2154,6 +2156,10 @@ export default class ChessRules { return; } let movingPiece = this.getDomPiece(move.start.x, move.start.y); + if (!movingPiece) { //TODO this shouldn't be required + callback(); + return; + } const initTransform = movingPiece.style.transform; let chessboard = document.getElementById(this.containerId).querySelector(".chessboard");