X-Git-Url: https://git.auder.net/variants/%24%7Bobj.vname%7D/style.css?a=blobdiff_plain;f=variants%2FAtomic%2Fclass.js;h=924d2226e640224a60fa1b848227cea851c3e234;hb=639afc982f9c3be3b4748ef10e8ef771a295712f;hp=ad2e9a14da4c1454445327507ac6170afef02e39;hpb=6f74b81a893da23181f30e2ef1e68bde8a5476cd;p=xogo.git diff --git a/variants/Atomic/class.js b/variants/Atomic/class.js index ad2e9a1..924d222 100644 --- a/variants/Atomic/class.js +++ b/variants/Atomic/class.js @@ -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); }