protected void hitBall(final Ball ball) {
        // If the ball is intersecting the paddle
        if (ball.getY() + (2 * ball.getRadius()) > this.getY() //top
                && ball.getY() < this.getY() + PADDLEHEIGHT //bottom
                && ball.getX() + (2 * ball.getRadius()) > this.getX() //left
                && ball.getX() < this.getX() + PADDLEWIDTH //right
                && ball.getYVelocity() > 0 // going down
                ) {
            ball.setYVelocity(ball.getYVelocity() * -1);
            // This section increments or decrements the Ball's x velocity
            // based on which side of the paddle it hits. This is a weak way to
            // change the velocity of the ball but it works for a first pass
            // solution.
            if ((ball.getX() + ball.getRadius())
                    < (this.getX() + PADDLEWIDTH / 2)) {
                ball.setXVelocity(ball.getXVelocity() - 1);
            } else {
                ball.setXVelocity(ball.getXVelocity() + 1);
            }
        }
    }