public void move() {
        assemble(); //Assemble the rectangles to be drawn
        if (((getXPos() <= 0) && deltaH == -1) || ((getXPos() + getBoundingBoxWidth() >= Vivarium.getFrameWidth()) && deltaH == 1)) //Prevents objects from going off-screen
            deltaH *= -1; //Multiply direction by -1 to reverse it.
        if (((getYPos() + getBoundingBoxHeight() >= Vivarium.getFrameHeight()) && deltaV == 1) || ((getYPos() <= 0) && deltaV == -1)) //Prevents objects from going off-screen
            deltaV *= -1;   //Multiply direction by -1 to reverse it.
        moveTo(getXPos() + (deltaH * getXSpeed()), getYPos() + (deltaV * getYSpeed())); //Move the object to the new location
    }