From ab2ca6784b154f0fd6183b908df124063a45f876 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Thu, 30 Jan 2025 18:26:19 +0100
Subject: [PATCH] update

---
 base_rules.js            | 3 +--
 variants/Dynamo/class.js | 8 ++++++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/base_rules.js b/base_rules.js
index 3d8e463..888fdcf 100644
--- a/base_rules.js
+++ b/base_rules.js
@@ -2235,8 +2235,7 @@ export default class ChessRules {
 
   // 'color' arg because some variants (e.g. Refusal) check opponent moves
   filterValid(moves, color) {
-    if (!color)
-      color = this.turn;
+    color = color || this.turn;
     const oppCols = this.getOppCols(color);
     let kingPos = this.searchKingPos(color);
     return moves.filter(m => {
diff --git a/variants/Dynamo/class.js b/variants/Dynamo/class.js
index 7b835e0..d726522 100644
--- a/variants/Dynamo/class.js
+++ b/variants/Dynamo/class.js
@@ -181,8 +181,8 @@ export default class DynamoRules extends ChessRules {
   // NOTE: for pushes, play the pushed piece first.
   //       for pulls: play the piece doing the action first
   // NOTE: to push a piece out of the board, make it slide until its king
-  getPotentialMovesFrom([x, y]) {
-    const color = this.turn;
+  getPotentialMovesFrom([x, y], color) {
+    const color = color || this.turn;
     const sqCol = this.getColor(x, y);
     const pawnShift = (color == 'w' ? -1 : 1);
     const pawnStartRank = (color == 'w' ? 6 : 1);
@@ -486,6 +486,10 @@ export default class DynamoRules extends ChessRules {
     return [];
   }
 
+  getAllPotentialMoves(color) {
+    
+  }
+
   getSlideNJumpMoves([x, y], steps, oneStep) {
     let moves = [];
     const c = this.getColor(x, y);
-- 
2.48.1