+ filterValid(moves) {
+ if (this.turn == 'w') return moves;
+ return super.filterValid(moves);
+ }
+
+ getCheckSquares() {
+ if (this.turn == 'w') return [];
+ return (
+ this.underCheck('b')
+ ? [JSON.parse(JSON.stringify(this.kingPos['b']))]
+ : []
+ );
+ }
+