X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=variants%2FAlapo%2Fclass.js;h=483641334b0208537cd75c5968db5b9759ae1ece;hb=f3e90e30b6e7ff416afe288bc9dd865e5daf9860;hp=540747d6e047aa2ec0ba7fc305824e633623317b;hpb=65cf1690c6119c949e2ea8feba8835b6e90b79a2;p=xogo.git diff --git a/variants/Alapo/class.js b/variants/Alapo/class.js index 540747d..4836413 100644 --- a/variants/Alapo/class.js +++ b/variants/Alapo/class.js @@ -1,9 +1,16 @@ import ChessRules from "/base_rules.js"; -import { ArrayFun } from "/utils/array.js"; -import { Random } from "/utils/alea.js"; +import {ArrayFun} from "/utils/array.js"; +import {Random} from "/utils/alea.js"; export default class AlapoRules extends ChessRules { + static get Options() { + return { + select: C.Options.select, + styles: C.Options.styles.filter(s => s != "teleport") + }; + } + get hasFlags() { return false; } @@ -142,8 +149,14 @@ export default class AlapoRules extends ChessRules { won[c] = this.board[goal].some((b,j) => { return ( this.getColor(goal, j) == c && - this.findCapturesOn( - [goal, j], {one: true, oppCol: oppCol}).length == 0 + !this.findCapturesOn( + [goal, j], + { + one: true, + oppCol: oppCol, + segments: this.options["cylinder"] + } + ) ); }); }