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