- if (
- (piece != 'q' && type != piece) ||
- (piece == 'q' && type == 'n')
- ) {
- Array.prototype.push.apply(moves,
- super.getPotentialMovesOf(type, [x, y]));
- }
+ if ((piece != 'q' && type != piece) || (piece == 'q' && type == 'n'))
+ res.both.push(this.pieces()[type].both[0]);