X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FSwitching.js;h=8cb3141dd93729a80f530bcbbbbfd1d5cf370e47;hb=7e8a7ea1cb66adb4a987badfb0a3c2f99a21bd0a;hp=b940d0a624dc9e061e8e08e1f525e82ffec748b8;hpb=0b8bd1214d662f6b1964f0807eda114ed1cac3c4;p=vchess.git diff --git a/client/src/variants/Switching.js b/client/src/variants/Switching.js index b940d0a6..8cb3141d 100644 --- a/client/src/variants/Switching.js +++ b/client/src/variants/Switching.js @@ -1,6 +1,7 @@ import { ChessRules, Move, PiPo } from "@/base_rules"; export class SwitchingRules extends ChessRules { + // Build switch move between squares x1,y1 and x2,y2 getSwitchMove_s([x1, y1], [x2, y2]) { const c = this.getColor(x1, y1); //same as color at square 2 @@ -123,4 +124,5 @@ export class SwitchingRules extends ChessRules { // Switch return "S" + V.CoordsToSquare(move.start) + V.CoordsToSquare(move.end); } -} + +};