BaseCard.prototype.atPos = function(x, y) {   
    if(x>=this.x && y>=this.y && x<=this.x+this.width && y <=this.y+this.height) {
        return true;
    }
    return false;