X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=variants%2FChakart%2Fclass.js;h=69a2e4c46e16260cb6f9192648e85dbcd5bec618;hb=f382c57bf08425c170479e55b8670efaf3a7a548;hp=9659ef38fac18e2f9c30baa1666e097cf6d2d767;hpb=3a77a0b4c3ba2f767a81ef688ae6aa70b95250be;p=xogo.git diff --git a/variants/Chakart/class.js b/variants/Chakart/class.js index 9659ef3..69a2e4c 100644 --- a/variants/Chakart/class.js +++ b/variants/Chakart/class.js @@ -1,7 +1,15 @@ -import { ChessRules, Move, PiPo } from "@/base_rules"; -import { SuicideRules } from "@/variants/Suicide"; -import { ArrayFun } from "@/utils/array"; -import { randInt } from "@/utils/alea"; +import ChessRules from "/base_rules"; +import GiveawayRules from "/variants/Giveaway"; + +// TODO + display bonus messages +// + animation + multi-moves for bananas/bombs/mushrooms + + + +import { ArrayFun } from "/utils/array"; +import { randInt } from "/utils/alea"; +import PiPo from "/utils/PiPo.js"; +import Move from "/utils/Move.js"; export class ChakartRules extends ChessRules { @@ -25,28 +33,13 @@ export class ChakartRules extends ChessRules { static get PawnSpecs() { return SuicideRules.PawnSpecs; } - - static get HasCastle() { + get hasCastle() { return false; } - - static get HasEnpassant() { + get hasEnpassant() { return false; } - static get CorrConfirm() { - // Because of bonus effects - return false; - } - - static get CanAnalyze() { - return false; - } - - static get SomeHiddenMoves() { - return true; - } - static get IMMOBILIZE_CODE() { return { 'p': 's', @@ -1173,11 +1166,12 @@ export class ChakartRules extends ChessRules { return "*"; } - static GenRandInitFen(options) { + genRandInitFen(seed) { + const gr = new GiveawayRules({}, true); return ( - SuicideRules.GenRandInitFen(options).slice(0, -1) + + gr.genRandInitFen(seed).slice(0, -1) + // Add Peach + Mario flags + capture counts - "1111 000000000000" + '{"flags": "1111", "ccount": "000000000000"}' ); }