X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FVchess.js;fp=client%2Fsrc%2Fvariants%2FVchess.js;h=4e84eb0e9115d3e80757029488fc13b6d1e1621c;hp=0000000000000000000000000000000000000000;hb=c01212801607b7f6336d6378ad64872a19bb4f15;hpb=c3ff3a0c807d97c0311a06491318fe02440266db diff --git a/client/src/variants/Vchess.js b/client/src/variants/Vchess.js new file mode 100644 index 00000000..4e84eb0e --- /dev/null +++ b/client/src/variants/Vchess.js @@ -0,0 +1,17 @@ +import { ChessRules } from "@/base_rules"; + +export class VchessRules extends ChessRules { + static get PawnSpecs() { + return Object.assign( + {}, + ChessRules.PawnSpecs, + { captureBackward: true } + ); + } + + getNotation(move) { + let notation = super.getNotation(move); + // TODO: if capture backwards, add an indication 'b' + return notation; + } +};