int blockWidth = (int)b.getRect().getWidth();
int blockTop = (int)b.getRect().getMinY();
int blockBottom = blockTop + blockHeight;
int blockRight = blockLeft + blockWidth;
Point pointRight = new Point(ballLeft + ballWidth + 1, ballTop + ballHeight/2);
Point pointLeft = new Point(ballLeft - 1, ballTop + ballHeight/2);
Point pointTop = new Point(ballLeft + ballWidth/2, ballTop - 1);
Point pointBottom = new Point(ballLeft + ballWidth/2, ballTop + ballHeight + 1);
Point topLeftCorner = new Point(ballLeft - 1, ballTop);
Point topRightCorner = new Point(ballLeft + ballWidth + 1, ballTop);
Point bottomLeftCorner = new Point(ballLeft - 1, ballTop + ballHeight);
Point bottomRightCorner = new Point(ballLeft + ballWidth + 1, ballTop + ballHeight);
if (b.getRect().contains(pointRight)) {
ball.accelX *= -1;