Random level generation, Demo code