public static <T> void loopGenerator(Generator<T> gen, int timeToWait) {
		int mapsCreated = 0;
		while (true) {
			// generate and show a map
			Map map = gen.generateMap(1);
			if (timeToWait > 0) {
				System.out.println(map.toString());
			}
			mapsCreated++;
			System.out.println("Map nr.: " + mapsCreated);

			try {
				Thread.sleep(timeToWait);
			} catch (InterruptedException e) {
			}

		}
	}