public void checkOutOfBound()
    {
        if (getX() == 0 || getX() == getWorld().getWidth()-1) {
            changeX = -changeX;
            // sound effect
            Greenfoot.playSound("baseball.wav");
        }
        // Makes ball move in opposite direction after collision
        if (getY() == 0) {
            changeY = -changeY;
        }      

    }