X-Git-Url: https://git.auder.net/%7B%7B%20asset%28%27mixstore/css/static/current/gitweb.js?a=blobdiff_plain;f=variants%2FAtomic%2Fclass.js;h=cc339ff93e2dcbf4dfaeab0a8a5211a8d63a853c;hb=535c464b0543306a0ea36c66f07dcfad7a951efc;hp=ad2e9a14da4c1454445327507ac6170afef02e39;hpb=6f74b81a893da23181f30e2ef1e68bde8a5476cd;p=xogo.git diff --git a/variants/Atomic/class.js b/variants/Atomic/class.js index ad2e9a1..cc339ff 100644 --- a/variants/Atomic/class.js +++ b/variants/Atomic/class.js @@ -7,16 +7,18 @@ export default class AtomicRules extends ChessRules { static get Options() { return { select: C.Options.select, - check: [ + input: [ { label: "Balanced", - defaut: false, - variable: "rempawn" + variable: "rempawn", + type: "checkbox", + defaut: false }, { label: "Falling pawn", - defaut: false, - variable: "pawnfall" + variable: "pawnfall", + type: "checkbox", + defaut: false } ], styles: C.Options.styles.filter(s => s != "atomic") @@ -24,13 +26,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); }