}
sumElts++;
} else {
- const num = parseInt(row[i]);
+ const num = parseInt(row[i], 10);
if (isNaN(num)) return false;
sumElts += num;
}
return super.filterValid(moves);
}
- getCheckSquares(color) {
- if (color == 'w') return [];
+ getCheckSquares() {
+ if (this.turn == 'w') return [];
return (
this.underCheck('b')
? [JSON.parse(JSON.stringify(this.kingPos['b']))]