/** Call this method when a ball hits the block */
public void notifyHit(Ball ball) {
Paddle lastPaddle = ball.getLastPaddle();
if (lastPaddle != null) {
float itemSpeed = 2.0f;
Vector2f itemVelocity = null;
switch (lastPaddle.getPlace()) {
case LEFT:
itemVelocity = new Vector2f(-itemSpeed, 0.0f);
break;
case RIGHT:
itemVelocity = new Vector2f(itemSpeed, 0.0f);
break;
case TOP:
itemVelocity = new Vector2f(0.0f, itemSpeed);
break;
case BOTTOM:
itemVelocity = new Vector2f(0.0f, -itemSpeed);
break;
default:
throw new IllegalStateException("Paddle in unspecified place");
}