@Override
	public void tick() {
        if (fuelSlider.isActive()) {
            fuelSlider.tick();
        }
        if (massSlider.isActive()) {
            massSlider.tick();
            if (rocket.getY() < 0.001) {
                mass = massSlider.getValue();
                rocket = new Rectangle(210, 0, (int) (mass * 8), 60);
            }
        }

        if (running) {
            if (fuel > 0) {
                ay = -EXHAUST_VELOCITY / mass();
                fuel--;
            } else {
                ay = 0;
            }
            if (rocket.getY() > 0) {
                ay -= (9.8 / 60); // gravity
            }
            vy += ay;
            rocket.setBounds((int) rocket.getX(), (int) (rocket.getY() + vy), (int) rocket.getWidth(), (int) rocket.getHeight());
            if (rocket.getY() < 0.001) {
                rocket.setBounds((int) rocket.getX(), 0, (int) rocket.getWidth(), (int) rocket.getHeight());
            }

            if (rocket.getY() + rocket.getHeight() > maxHeight) {
                maxHeight = (int) (rocket.getY() + rocket.getHeight());
            }
        }
	}