diff options
author | Diego Roversi <diegor@tiscali.it> | 2020-05-23 10:28:17 +0200 |
---|---|---|
committer | Diego Roversi <diegor@tiscali.it> | 2020-05-23 10:28:17 +0200 |
commit | 1a67e49491cef4cc7e7209618017004f4e1be9a5 (patch) | |
tree | b83f6bdae02e0dcbd1dec2d61c131294d2118064 | |
parent | 2c41e377ab7257f879840abca9305fd25c274100 (diff) |
-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: |