}
genRandInitFen(seed) {
- const gr = new GiveawayRules(
- {mode: "suicide", options: this.options, genFenOnly: true});
+ const options = Object.assign({mode: "suicide"}, this.options);
+ const gr = new GiveawayRules({options: options, genFenOnly: true});
// Add empty cmove:
return (
gr.genRandInitFen(seed).slice(0, -17) + '{"enpassant":"-","cmove":"-"}');
const cmoveFen = !this.cmove
? "-"
: C.CoordsToSquare(this.cmove.start) + C.CoordsToSquare(this.cmove.end);
- return super.getFen().slice(0, -1) + ',"' + cmoveFen + '"}';
+ return super.getFen().slice(0, -1) + ',"cmove":"' + cmoveFen + '"}';
}
getBasicMove([sx, sy], [ex, ey]) {