++ make points a bit nicer
This commit is contained in:
parent
a2193fd096
commit
7272edb7d5
1 changed files with 8 additions and 1 deletions
|
@ -189,6 +189,9 @@ class Game(object):
|
|||
point_path = "{}/points".format(user.key)
|
||||
points = self.read_etcd(point_path, recursive=True)
|
||||
|
||||
if not points:
|
||||
continue
|
||||
|
||||
for challenge in points.children:
|
||||
user_points[username] += int(challenge.value)
|
||||
|
||||
|
@ -217,7 +220,11 @@ https://code.ungleich.ch/nico/ungleich-game
|
|||
for k, v in point_list.items():
|
||||
res.append("{} has {} points".format(k, v))
|
||||
|
||||
return "\n".join(res)
|
||||
return """
|
||||
Point list (aka high score)
|
||||
---------------------------
|
||||
{}
|
||||
""".format("\n".join(res))
|
||||
|
||||
def register(self):
|
||||
args = require_args("user")
|
||||
|
|
Loading…
Reference in a new issue