From 527eb72c3dd1947a70a398a882db801617313a12 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Wed, 1 Apr 2026 13:43:40 +0200 Subject: [PATCH] update --- variants/Eightpieces/class.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) { -- 2.53.0