From c2ec1f713db8bde59b5cd6c8debed2c8eddcd237 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Tue, 23 Dec 2025 04:36:53 +0100 Subject: [PATCH] update --- base_rules.js | 3 ++- variants/Eightpieces/class.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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}" -- 2.48.1