public void adjustForCollision(Enemy enemy) {
        double distanceApart = distance(this.x, this.y, enemy.getX(), enemy.getY());
        if (distanceApart != 0) {
            this.x += (this.x-enemy.getX())/(distanceApart);
            this.y += (this.y-enemy.getY())/(distanceApart);
        }
    }