public void move() {
        if (this.getLeft() <= 0 && moveInt == 1) {
            this.setMoveInt(0);
            x = 1;
        } else if (this.getRight() >= 500 && moveInt == 2) {
            this.setMoveInt(0);
            x = 499 - width;
        }
        if (this.getMoveInt() == 1) {
            this.x -= speed;
        }
        if (this.getMoveInt() == 2) {
            this.x += speed;
        }
    }