X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FRugby.js;h=64c9942628970981ec0603fd554659dd57b928cb;hb=HEAD;hp=bbe25cb70dd527b1ac30670ee9f061b99b3f6271;hpb=7e8a7ea1cb66adb4a987badfb0a3c2f99a21bd0a;p=vchess.git diff --git a/client/src/variants/Rugby.js b/client/src/variants/Rugby.js index bbe25cb7..64c99426 100644 --- a/client/src/variants/Rugby.js +++ b/client/src/variants/Rugby.js @@ -3,6 +3,10 @@ import { ArrayFun } from "@/utils/array"; export class RugbyRules extends ChessRules { + static get Options() { + return null; + } + static get HasFlags() { return false; } @@ -29,7 +33,7 @@ export class RugbyRules extends ChessRules { this.turn == 'w' ? [ [-1,-1], [-1,1], [0,1], [0,-1], [1,-1], [1,0], [1,1] ] : [ [1,-1], [1,1], [0,1], [0,-1], [-1,-1], [-1,0], [-1,1] ]; - let addMoves = this.getSlideNJumpMoves(sq, steps, "oneStep"); + let addMoves = this.getSlideNJumpMoves(sq, steps, 1); return moves.concat(addMoves.filter(m => m.vanish.length == 1)); } @@ -63,4 +67,8 @@ export class RugbyRules extends ChessRules { return "1/2"; } + getNotation(move) { + return V.CoordsToSquare(move.start) + V.CoordsToSquare(move.end); + } + };