TODO: Cannibal + pawnfall, at least, fail
[xogo.git] / variants / Atomic / class.js
index ad2e9a1..924d222 100644 (file)
@@ -24,13 +24,13 @@ export default class AtomicRules extends ChessRules {
   }
 
   constructor(o) {
+    o.options["atomic"] = true;
     super(o);
-    this.options["atomic"] = true;
   }
 
   canIplay(x, y) {
     if (this.options["rempawn"] && this.movesCount == 0)
-      return (this.turn == side && this.getPiece(x, y) == "p");
+      return (this.playerColor == this.turn && this.getPiece(x, y) == "p");
     return super.canIplay(x, y);
   }