}
genRandInitBaseFen() {
- const s =
- FenUtil.setupPieces(['r', 'b', 'q', 'q', 'b', 'r'], {diffCol: ['b']});
+ const s = FenUtil.setupPieces(
+ ['r', 'b', 'q', 'q', 'b', 'r'],
+ {
+ randomness: this.options["randomness"],
+ diffCol: ['b']
+ }
+ );
const piece2pawn = {
r: 't',
q: 's',
// Try both colors (to detect potential suicides)
let won = {};
for (let c of ['w', 'b']) {
- const oppCol = C.GetOppCol(c);
+ const oppCol = C.GetOppTurn(c);
const goal = (c == 'w' ? 0 : 5);
won[c] = this.board[goal].some((b,j) => {
return (