From: Benjamin Auder Date: Wed, 1 Apr 2026 11:43:40 +0000 (+0200) Subject: update X-Git-Url: https://git.auder.net/app_dev.php/js/scripts/css/index.css?a=commitdiff_plain;h=HEAD;p=xogo.git update --- diff --git a/variants/Eightpieces/class.js b/variants/Eightpieces/class.js index 527d2b0..1b50694 100644 --- a/variants/Eightpieces/class.js +++ b/variants/Eightpieces/class.js @@ -142,10 +142,10 @@ export default class EightpiecesRules extends ChessRules { let [i, j] = this.increment([x, y], step); if ( this.onBoard(i, j) && - this.board[i][j] == 'j' && + this.getPiece(i, j) == 'j' && this.getColor(i, j) == oppCol ) { - return true; + return true; } } return false; @@ -188,6 +188,10 @@ export default class EightpiecesRules extends ChessRules { return finalMoves; } + underAttack() { + // TODO: check enemy sentry(ies), for each, check all of our own pieces which attack the square (if belonging to opponent!). Then, call : + return super.undeerAttack(); + } // Lazy sentry attacks check: after push move filterValid(moves, color) {