Make each default car a separate list in memory
So the link strings don't just grow over time
This commit is contained in:
parent
fc80d291ab
commit
56f7c8d278
@ -339,7 +339,7 @@ for fname in glob.glob('/home/*/' + traincarFN):
|
||||
##print "Cannot open " + fname # for debuggering purposes
|
||||
|
||||
while len(cars) < max_cars:
|
||||
cars.append(default_car) ## add default cars if train too short
|
||||
cars.append([*default_car]) ## add copies of default cars if train too short
|
||||
|
||||
shuffle(cars)
|
||||
cars = cars[0:max_cars]
|
||||
|
Loading…
x
Reference in New Issue
Block a user