X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FRugby.js;h=d802ca1a861d4f8cb30b18408a2a400c69f14985;hb=809ab1a837e0f748987bcf7d66defa11cb7a1792;hp=04306c265460fd25cd5be3977b4bffda9bbd0aca;hpb=7769191167d394c3b52625dae62b4af93803d656;p=vchess.git diff --git a/client/src/variants/Rugby.js b/client/src/variants/Rugby.js index 04306c26..d802ca1a 100644 --- a/client/src/variants/Rugby.js +++ b/client/src/variants/Rugby.js @@ -2,6 +2,7 @@ import { ChessRules } from "@/base_rules"; import { ArrayFun } from "@/utils/array"; export class RugbyRules extends ChessRules { + static get HasFlags() { return false; } @@ -14,6 +15,8 @@ export class RugbyRules extends ChessRules { ); } + scanKings() {} + getPotentialMovesFrom(sq) { // There are only pawns: return this.getPotentialPawnMoves(sq); @@ -44,6 +47,10 @@ export class RugbyRules extends ChessRules { preUndo() {} postUndo() {} + getCheckSquares() { + return []; + } + getCurrentScore() { // Turn has changed: const color = V.GetOppCol(this.turn); @@ -55,4 +62,9 @@ export class RugbyRules extends ChessRules { // Stalemate (will probably never happen) return "1/2"; } + + getNotation(move) { + return V.CoordsToSquare(move.start) + V.CoordsToSquare(move.end); + } + };