public boolean collision() {
		
		// We hit the right wall.
		if (xPosition  + BALL_RADIUS > BALL_MAX_X) {
			if (theta < Math.PI / 2 || theta > 3 * Math.PI / 2) {
				
				/* Critical Region */
				synchronized (this) {
					theta = wrapTheta(Math.PI - theta);
					return true;
				}
			}
		}
		
		// We hit the left wall.
		if (xPosition  - BALL_RADIUS < BALL_MIN_X) {
			if (theta > Math.PI / 2 & theta < 3 * Math.PI / 2) {
				
				/* Critical Region */
				synchronized (this) {
					theta = wrapTheta(Math.PI - theta);
					return true;
				}
			}
		} 
		
		// We hit the top wall.
		if (yPosition  - BALL_RADIUS < BALL_MIN_Y ) {
			if (theta > Math.PI) {
				
				/* Critical Region */
				synchronized (this) {
					theta = wrapTheta((2 * Math.PI) - theta);
					return true;
				}
			}
		}
		
		// We hit the bottom wall.
		if (yPosition  + BALL_RADIUS > BALL_MAX_Y) {
			if (theta < Math.PI) {
				
				/* Critical Region */
				synchronized (this) {
					theta = wrapTheta((2 * Math.PI) - theta);
					return true;
				}
			}
		}
		
		// We did not hit anything.
		return false;
	}