- if (y<V.size.y-1 && this.board[x+shift][y+1] != V.EMPTY
- && this.canTake([x,y], [x+shift,y+1]))
- {
- moves.push(this.getBasicMove([x,y], [x+shift,y+1], {c:color,p:V.KING}));
+ if (
+ y < V.size.y - 1 &&
+ this.board[x + shift][y + 1] != V.EMPTY &&
+ this.canTake([x, y], [x + shift, y + 1])
+ ) {
+ moves.push(
+ this.getBasicMove([x, y], [x + shift, y + 1], { c: color, p: V.KING })
+ );