return true;
}
- static GenRandInitFen(randomness) {
- const baseFen = Pandemonium2Rules.GenRandInitFen(randomness)
+ static GenRandInitFen(options) {
+ const baseFen = Pandemonium2Rules.GenRandInitFen(options)
return baseFen.substr(0, 22) + "91/91/" + baseFen.substr(22);
}
}
applyPromotions(moves, promoted) {
- const lastRanks = (this.turn == 'w' ? [0, 1] : [V.size.x - 1, V.size.x]);
+ const lastRanks =
+ (this.turn == 'w' ? [0, 1] : [V.size.x - 1, V.size.x - 2]);
let promotions = [];
moves.forEach(m => {
if (lastRanks.includes(m.start.x) || lastRanks.includes(m.end.x)) {