From: Benjamin Auder Date: Tue, 23 Dec 2025 03:36:53 +0000 (+0100) Subject: update X-Git-Url: https://git.auder.net/js/img/doc/html/scripts/css/config.php?a=commitdiff_plain;h=HEAD;p=xogo.git update --- diff --git a/base_rules.js b/base_rules.js index 26e8e49..8613c4b 100644 --- a/base_rules.js +++ b/base_rules.js @@ -79,7 +79,8 @@ export default class ChessRules { }; } - get pawnPromotions() { + // Arguments x, y are useful for Eightpieces (maybe others?) + get pawnPromotions(x, y) { return ['q', 'r', 'n', 'b']; } diff --git a/variants/Eightpieces/class.js b/variants/Eightpieces/class.js index 7e84abf..1b7c1b1 100644 --- a/variants/Eightpieces/class.js +++ b/variants/Eightpieces/class.js @@ -62,10 +62,10 @@ export default class EightpiecesRules extends ChessRules { } // TODO: need argument x, y to know which orientations are allowed - get pawnPromotions() { + get pawnPromotions(x, y) { // TODO: lancer orientation = backward vertical from promotion square? // So that user can choose orientation later when moving it. - return ['q', 'r', 'n', 'b', 'j', 's', 'l']; + return ['q', 'r', 'n', 'b', 'j', 's', 'l']; //TODO } // lorient : "{z1:NO,z2:SE, ...etc}"