From f98561fc522c6172c4865963570991f84129ac8e Mon Sep 17 00:00:00 2001 From: David <30721971+dvlwj@users.noreply.github.com> Date: Fri, 13 Jul 2018 22:41:55 +0700 Subject: [PATCH] Add files via upload trying new result --- results.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/results.py b/results.py index 1203154..e08c3d7 100644 --- a/results.py +++ b/results.py @@ -61,8 +61,8 @@ def add_other_cards(player, results, game): def player_list(game): """Generate list of player strings""" - return [_("{name} ({number} card)", - "{name} ({number} cards)", + return [_("*{name}* ({number} card)", + "*{name}* ({number} cards)", len(player.cards)) .format(name=player.user.first_name, number=len(player.cards)) for player in game.players] @@ -199,14 +199,18 @@ def add_card(game, card, results, can_play): def game_info(game): players = player_list(game) + players_numbered = [ + '{}. {}'.format(i + 1, p) + for i, p in enumerate(players) + ] return InputTextMessageContent( _("Current player: {name}") .format(name=display_name(game.current_player.user)) + "\n" + _("Last card: {card}").format(card=repr(game.last_card)) + "\n" + - _("Player: {player_list}", - "Players: {player_list}", + _("Player: \n{player_list}", + "Players: \n{player_list}", len(players)) - .format(player_list=" -> ".join(players)) - ) \ No newline at end of file + .format(player_list="\n".join(players_numbered)) + )