public void update() {
        // Move the ball.
        setLocation(getX() + getXVelocity(), getY() + getYVelocity());

        // Then do any corrections that result from collisions.
        // Each of these are negative if a collision occurs
        int distanceFromLeft = getX() - this.radius;
        int distanceFromRight = BrickBreaker.GAMEWIDTH - (getX() + this.radius);
        // NOTE! The top of the screen is defined as 0, not the bottom.
        int distanceFromTop = getY() - this.radius;

        if (distanceFromRight <= 0) {
            // Correct by moving the ball left by 2x the overlap
            setLocation(getX() + (2 * distanceFromRight), getY());
            if (getXVelocity() > 0) { setXVelocity(getXVelocity() * -1); }
        }
        if (distanceFromLeft <= 0) {
            // Correct by moving the ball right by 2x the overlap.
            setLocation(getX() - (2 * distanceFromLeft), getY());
            if (getXVelocity() < 0) { setXVelocity(getXVelocity() * -1); }
        }
        // NOTE! The top of the screen is defined as 0, not the bottom.
        if (distanceFromTop <= 0) {
            // Correct by moving the ball down by 2x the overlap.
            setLocation(getX(), getY() - (2 * distanceFromTop));
            if (getYVelocity() < 0) { setYVelocity(getYVelocity() * -1); }
        }
        // Removing the ball is handled by the timer.
        // Bouncing off the paddle is handled by the timer.
        // Bouncing and destroying bricks is handled by the timer.
    }