Add files via upload

trying new result
This commit is contained in:
David 2018-07-13 22:41:55 +07:00 committed by GitHub
parent 94ea61e941
commit f98561fc52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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))
)