public void update(int delta) {
    if (getY() > Window.HEIGHT - getHeight()) {
      setY(Window.HEIGHT - getHeight());
      speed = -speed;
    } else if (getY() < 0) {
      setY(0);
      speed = -speed;
    }
    if (getX() > Window.WIDTH - getWidth()) {
      setX(Window.WIDTH - getWidth());
      speed = -speed;
    } else if (getX() < 0) {
      setX(0);
      speed = -speed;
    }
    Random r = new Random();
    r.nextInt(2);
    setY(getY() + delta * speed);
    // setX(getY() + delta * speed);
  }