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
14
results.py
14
results.py
|
@ -61,8 +61,8 @@ def add_other_cards(player, results, game):
|
||||||
|
|
||||||
def player_list(game):
|
def player_list(game):
|
||||||
"""Generate list of player strings"""
|
"""Generate list of player strings"""
|
||||||
return [_("{name} ({number} card)",
|
return [_("*{name}* ({number} card)",
|
||||||
"{name} ({number} cards)",
|
"*{name}* ({number} cards)",
|
||||||
len(player.cards))
|
len(player.cards))
|
||||||
.format(name=player.user.first_name, number=len(player.cards))
|
.format(name=player.user.first_name, number=len(player.cards))
|
||||||
for player in game.players]
|
for player in game.players]
|
||||||
|
@ -199,14 +199,18 @@ def add_card(game, card, results, can_play):
|
||||||
|
|
||||||
def game_info(game):
|
def game_info(game):
|
||||||
players = player_list(game)
|
players = player_list(game)
|
||||||
|
players_numbered = [
|
||||||
|
'{}. {}'.format(i + 1, p)
|
||||||
|
for i, p in enumerate(players)
|
||||||
|
]
|
||||||
return InputTextMessageContent(
|
return InputTextMessageContent(
|
||||||
_("Current player: {name}")
|
_("Current player: {name}")
|
||||||
.format(name=display_name(game.current_player.user)) +
|
.format(name=display_name(game.current_player.user)) +
|
||||||
"\n" +
|
"\n" +
|
||||||
_("Last card: {card}").format(card=repr(game.last_card)) +
|
_("Last card: {card}").format(card=repr(game.last_card)) +
|
||||||
"\n" +
|
"\n" +
|
||||||
_("Player: {player_list}",
|
_("Player: \n{player_list}",
|
||||||
"Players: {player_list}",
|
"Players: \n{player_list}",
|
||||||
len(players))
|
len(players))
|
||||||
.format(player_list=" -> ".join(players))
|
.format(player_list="\n".join(players_numbered))
|
||||||
)
|
)
|
Loading…
Reference in a new issue