diff options
Diffstat (limited to 'bubbob/player.py')
-rw-r--r-- | bubbob/player.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bubbob/player.py b/bubbob/player.py index e4d99fe..0a67789 100644 --- a/bubbob/player.py +++ b/bubbob/player.py @@ -12,6 +12,8 @@ from mnstrmap import DigitsMisc KEEPALIVE = 5*60 # seconds CheatDontDie = 0 +def cmp(a, b): + return (a > b) - (a < b) class Dragon(ActiveSprite): priority = 1 @@ -1060,7 +1062,8 @@ def scoreboard(reset=0, inplace=0, compresslimittime=0): teamslist[1].sort() plist.append((teamspoints[0], None, teamslist[0])) plist.append((teamspoints[1], None, teamslist[1])) - plist.sort() + print(f"scoreboard: plist={plist}", file=sys.stderr) + plist.sort(key=lambda x: x[0]) # sort by teamspoints? x0 = boards.bwidth y0 = boards.bheight for score, p, t in plist: |