);
if (!promotionOk)
return; //nothing to do
- if (!this.options["pawnfall"]) {
+ if (this.options["pawnfall"]) {
+ m.appear.shift();
+ m.pawnfall = true; //required in prePlay() /// ????????????
+ return;
+ }
+ //if (!this.options["pawnfall"]) { --> OK
if (
this.options["cannibal"] &&
this.board[x2][y2] != "" &&
}
else
finalPieces = this.pawnPromotions;
- }
+ //}
m.appear[0].p = finalPieces[0];
if (initPiece == "!") //cannibal king-pawn
m.appear[0].p = C.CannibalKingCode[finalPieces[0]];
}
let newMove = this.getBasicMove([x1, y1], [x2, y2], tr);
if (this.options["pawnfall"]) {
- newMove.appear.shift();
- newMove.pawnfall = true; //required in prePlay()
}
moreMoves.push(newMove);
}
});
}
+
+// TODO: englober + de cas ici...
+ // + generique start/end board or reserve
+ // + bien séparer les options... ?
+
prePlay(move) {
if (
typeof move.start.x == "number" &&