Skip to content
Snippets Groups Projects
Commit a50b1939 authored by Erik Nygren's avatar Erik Nygren :bullettrain_front:
Browse files

added safety breaks in loops to prevent infinite loops.

parent 474d13e4
No related branches found
No related tags found
1 merge request!154147 new level generator
...@@ -1032,7 +1032,6 @@ def sparse_rail_generator(num_cities=100, num_intersections=10, num_trainstation ...@@ -1032,7 +1032,6 @@ def sparse_rail_generator(num_cities=100, num_intersections=10, num_trainstation
connect_nodes(rail_trans, rail_array, node_positions[current_node], node_positions[neighb]) connect_nodes(rail_trans, rail_array, node_positions[current_node], node_positions[neighb])
node_stack.pop(0) node_stack.pop(0)
# Place train stations close to the node # Place train stations close to the node
# We currently place them uniformly distirbuted among all cities # We currently place them uniformly distirbuted among all cities
if num_cities > 1: if num_cities > 1:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment