From f6ce5a9533b3162b6833d0c54cca142f753f77ad Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Thu, 3 Jun 2021 21:11:26 +0200 Subject: [PATCH] support non-full teams --- server.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server.py b/server.py index 09916e3..67a088a 100755 --- a/server.py +++ b/server.py @@ -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 })