- // ROOK
- Array.prototype.push.apply(moves,
- this.findCaptures_aux(x, y, color, VariantRules.ROOK));
-
- // KNIGHT
- Array.prototype.push.apply(moves,
- this.findCaptures_aux(x, y, color, VariantRules.KNIGHT));
-
- // BISHOP
- Array.prototype.push.apply(moves,
- this.findCaptures_aux(x, y, color, VariantRules.BISHOP));
-
- // QUEEN
- Array.prototype.push.apply(moves,
- this.findCaptures_aux(x, y, color, VariantRules.QUEEN));
+ Array.prototype.push.apply(moves, this.findCaptures_aux(sq, V.PAWN));
+ Array.prototype.push.apply(moves, this.findCaptures_aux(sq, V.ROOK));
+ Array.prototype.push.apply(moves, this.findCaptures_aux(sq, V.KNIGHT));
+ Array.prototype.push.apply(moves, this.findCaptures_aux(sq, V.BISHOP));
+ Array.prototype.push.apply(moves, this.findCaptures_aux(sq, V.QUEEN));