X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FThreechecks.js;h=175b1246502da50385e9b8f9946f4f1bc01d7125;hb=2c5d7b20742b802d9c47916915c1114bcfc9a9c3;hp=3aa6db9860db5679e59b842a2d13ce6cf3582136;hpb=3a2a7b5fd3c6bfd0752838094c27e1fb6172d109;p=vchess.git diff --git a/client/src/variants/Threechecks.js b/client/src/variants/Threechecks.js index 3aa6db98..175b1246 100644 --- a/client/src/variants/Threechecks.js +++ b/client/src/variants/Threechecks.js @@ -1,6 +1,6 @@ import { ChessRules } from "@/base_rules"; -export const VariantRules = class ThreechecksRules extends ChessRules { +export class ThreechecksRules extends ChessRules { static IsGoodFlags(flags) { // 4 for castle + 2 for checks (0,1 or 2) return !!flags.match(/^[01]{4,4}[012]{2,2}$/); @@ -25,7 +25,7 @@ export const VariantRules = class ThreechecksRules extends ChessRules { } getPpath(b) { - // TODO: !!this.checkFlags condition for printDiagram, but clearly not good. + // TODO: !!this.checkFlags condition for printDiagram, but it's not good. // This is just a temporary fix. if (b[1] == 'k' && !!this.checkFlags && this.checkFlags[b[0]] > 0) return "Threechecks/" + b[0] + 'k_' + this.checkFlags[b[0]];