X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FSittuyin.js;h=a18c2f0b3a06972750a97087258bd3b4568a2e1d;hb=89a6214b27561878670914a65902aa51682efe61;hp=0ddf74c95abaa999e794619e7a6aa45618769fa4;hpb=ffeaef854d80445ef87f2cdf4fe71d60347a81bf;p=vchess.git diff --git a/client/src/variants/Sittuyin.js b/client/src/variants/Sittuyin.js index 0ddf74c9..a18c2f0b 100644 --- a/client/src/variants/Sittuyin.js +++ b/client/src/variants/Sittuyin.js @@ -2,6 +2,11 @@ import { ChessRules, Move, PiPo } from "@/base_rules"; import { randInt } from "@/utils/alea"; export class SittuyinRules extends ChessRules { + + static get Options() { + return null; + } + static get HasFlags() { return false; } @@ -259,18 +264,11 @@ export class SittuyinRules extends ChessRules { getPotentialBishopMoves(sq) { const forward = (this.turn == 'w' ? -1 : 1); return this.getSlideNJumpMoves( - sq, - V.steps[V.BISHOP].concat([ [forward, 0] ]), - "oneStep" - ); + sq, V.steps[V.BISHOP].concat([ [forward, 0] ]), 1); } getPotentialQueenMoves(sq) { - return this.getSlideNJumpMoves( - sq, - V.steps[V.BISHOP], - "oneStep" - ); + return this.getSlideNJumpMoves(sq, V.steps[V.BISHOP], 1); } getAllValidMoves() { @@ -288,22 +286,12 @@ export class SittuyinRules extends ChessRules { isAttackedByBishop(sq, color) { const forward = (this.turn == 'w' ? 1 : -1); return this.isAttackedBySlideNJump( - sq, - color, - V.BISHOP, - V.steps[V.BISHOP].concat([ [forward, 0] ]), - "oneStep" - ); + sq, color, V.BISHOP, V.steps[V.BISHOP].concat([ [forward, 0] ]), 1); } isAttackedByQueen(sq, color) { return this.isAttackedBySlideNJump( - sq, - color, - V.QUEEN, - V.steps[V.BISHOP], - "oneStep" - ); + sq, color, V.QUEEN, V.steps[V.BISHOP], 1); } underCheck(color) { @@ -402,4 +390,5 @@ export class SittuyinRules extends ChessRules { } return super.getNotation(move); } + };