@Override
	public void run() {
		while (true) {
			final String selectedString = UserInterface.selectPhysics(new ArrayList<>(SELECTABLE_PHYSICS.keySet()));
			System.out.println(selectedString);
			if (selectedString == null) {
				return;
			}
			final PlanetMatterPhysics selectedPhysics = SELECTABLE_PHYSICS.get(selectedString);

			final Planet selectedPlanet = UserInterface.selectPlanet(SIMULATION_PLANETS);
			if (selectedPlanet == null) {
				return;
			}
			final double initialVelocity = UserInterface.selectVelocity();

			final BouncyBallSimulation simulation = new BouncyBallSimulation(selectedPlanet, new Ball(initialVelocity,
					selectedPhysics));
			simulation.addHitGroundListener((matter, processedTime) -> UserInterface.displayBounce(simulation,
					processedTime));

			while (!shouldStop(simulation)) {
				simulation.advanceSecond();
				UserInterface.displaySimulationState(simulation);
			}

			System.out.println("The simulation has finished. Try another one.");
		}
	}