);
}
- static GenRandInitFen(randomness) {
+ static GenRandInitFen(options) {
// Add 16 pawns flags + empty umove:
- return ChessRules.GenRandInitFen(randomness)
+ return ChessRules.GenRandInitFen(options)
.slice(0, -2) + "1111111111111111 - -";
}
}
let baseMoves = [];
const c = this.turn;
- switch (piece || this.getPiece(x, y)) {
+ switch (piece) {
case V.PAWN: {
const firstRank = (c == 'w' ? 7 : 0);
baseMoves = this.getPotentialPawnMoves([x, y]).filter(m => {