{label: "Random", value: 1}
]
}],
+ input: [
+ {
+ label: "Pawn first",
+ variable: "pawnfirst",
+ type: "checkbox",
+ defaut: false
+ }
+ ],
styles: ["atomic", "capture", "cylinder"]
};
}
return false;
}
- genRandInitFen(seed) {
- const baseFen = super.genRandInitFen(seed);
- return "4k3/8" + baseFen.substring(17, 50) + " -"; //TODO: + flags 1188
+ genRandInitBaseFen() {
+ let baseFen = super.genRandInitBaseFen();
+ return {
+ fen: baseFen.fen.replace("rnbqkbnr/pppppppp", "4k3/8"),
+ o: {flags: baseFen.o.flags.substr(0, 2) + "88"}
+ };
}
- setOtherVariables(fenParsed) {
- super.setOtherVariables(fenParsed);
+ initReserves() {
this.reserve = { b: { p: 1 } };
}
// Just do not update any reserve (infinite supply)
updateReserve() {}
- getCastleMoves([x, y]) {
- if (this.GetColor(x, y) == 'b')
- return [];
- return super.getCastleMoves([x, y]);
+ canDrop([c, p], [i, j]) {
+ return (
+ this.board[i][j] == "" &&
+ (
+ p != "p" || this.options["pawnfirst"] ||
+ (c == 'w' && i < this.size.x - 1) ||
+ (c == 'b' && i > 0)
+ )
+ );
}
- getCurrentScore(move) {
- const score = super.getCurrentScore(move);
+ getCurrentScore(move_s) {
+ const score = super.getCurrentScore(move_s);
if (score != "*")
return score;
// Check pawns connection: