genRandInitBaseFen() {
const s = FenUtil.setupPieces(
- ['r', 'n', 'b', 'q', 'k', 'b', 'n', 'i'], {diffCol: ['b']});
+ ['r', 'n', 'b', 'q', 'k', 'b', 'n', 'i'],
+ {
+ randomness: this.options["randomness"],
+ diffCol: ['b']
+ }
+ );
if (this.options["randomness"] <= 1) {
// Fix immobilizers/rooks pattern
const toExchange1 = s.w.indexOf('r'),
isImmobilized([x, y]) {
const piece = this.getPiece(x, y);
const color = this.getColor(x, y);
- const oppCol = C.GetOppCol(color);
+ const oppCol = C.GetOppTurn(color);
const adjacentSteps = this.pieces()['k'].moves[0].steps;
for (let step of adjacentSteps) {
const [i, j] = [x + step[0], this.getY(y + step[1])];