Add files via upload
trying new result
This commit is contained in:
parent
94ea61e941
commit
f98561fc52
1 changed files with 10 additions and 6 deletions
16
results.py
16
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))
|
||||
)
|
||||
.format(player_list="\n".join(players_numbered))
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue