support non-full teams

This commit is contained in:
2021-06-03 21:11:26 +02:00
parent 8f8eba81fa
commit f6ce5a9533

View File

@@ -166,6 +166,11 @@ def balanceTool():
print(cur)
retDict = { "left" : {}, "right" : {} }
bestOption = list(bestOption)
if len(bestOption) < 10:
for x in range(10-len(bestOption)):
bestOption += [Player("", [0,0,0,0,0])]
for i in range(5):
retDict["left"].update( { positions[i] : bestOption[i].name })
retDict["right"].update({ positions[i] : bestOption[i+5].name })