Fix Madrasi rules
authorBenjamin Auder <benjamin.auder@somewhere>
Fri, 24 Apr 2020 00:16:24 +0000 (02:16 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Fri, 24 Apr 2020 00:16:24 +0000 (02:16 +0200)
client/src/variants/Madrasi.js

index 54c1862..ed2a879 100644 (file)
@@ -2,7 +2,7 @@ import { ChessRules } from "@/base_rules";
 
 export class MadrasiRules extends ChessRules {
   isImmobilized(sq) {
-    const oppCol = V.GetOppCol(this.turn);
+    const oppCol = V.GetOppCol(this.getColor(sq[0], sq[1]));
     const piece = this.getPiece(sq[0], sq[1]);
     let steps = [];
     switch (piece) {