@Override
	public void update(GameContainer container, int delta)
			throws SlickException {
		Input input = container.getInput();
		
		if(bumper.isBallConnected()){
			ball.setPosition(bumper.getX() + ballOffsetX , bumper.getY() - ballOffsetY);
		} else {
			Vector2f ballDir = ball.getDirection();
			ball.setX(ball.getX() + ballDir.x);
			ball.setY(ball.getY() + ballDir.y);
		}
		
		if (input.isKeyDown(Input.KEY_LEFT) && input.isKeyDown(Input.KEY_RIGHT)) {
		} else if (input.isKeyDown(Input.KEY_LEFT)) {
			bumper.setDirection(new Vector2f(-6.0f, 0));			
		} else if (input.isKeyDown(Input.KEY_RIGHT)) { 
			bumper.setDirection(new Vector2f(6.0f, 0));
		}
		
		bumper.updatePosition();
		
		if (input.isKeyDown(Input.KEY_SPACE)) {
			if(bumper.isBallConnected()) {
				bumper.disconnect();
				ball.setDirection(new Vector2f(2.5f, -2.5f));
				
			}
		}
	}