X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FAlice.js;h=9eb0e87833190209eb70998858a4ea2b22e9097d;hb=9dca2c935cebcaa3817b4f926f482f9cad4c5b53;hp=d64c077868fe2ac3bd257f8e786f255f26f7d907;hpb=3a2a7b5fd3c6bfd0752838094c27e1fb6172d109;p=vchess.git diff --git a/client/src/variants/Alice.js b/client/src/variants/Alice.js index d64c0778..9eb0e878 100644 --- a/client/src/variants/Alice.js +++ b/client/src/variants/Alice.js @@ -3,7 +3,7 @@ import { ArrayFun } from "@/utils/array"; // NOTE: alternative implementation, probably cleaner = use only 1 board // TODO? atLeastOneMove() would be more efficient if rewritten here (less sideBoard computations) -export const VariantRules = class AliceRules extends ChessRules { +export class AliceRules extends ChessRules { static get ALICE_PIECES() { return { s: "p", @@ -263,10 +263,7 @@ export const VariantRules = class AliceRules extends ChessRules { } getCurrentScore() { - if (this.atLeastOneMove()) - // game not over - return "*"; - + if (this.atLeastOneMove()) return "*"; const pieces = Object.keys(V.ALICE_CODES); const color = this.turn; const kp = this.kingPos[color];