Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.

Commit

Permalink
Improve open meld formatting a little bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Nihisil committed Jun 22, 2017
1 parent 74b3df1 commit 18bfb00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion project/tenhou/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ def start_game(self):

# set was called
if '<N who=' in message:
player_formatted_hand = ''
if meld_tile:
player_formatted_hand = main_player.format_hand_for_print(meld_tile)

meld = self.decoder.parse_meld(message)
self.table.add_called_meld(meld.who, meld)
logger.info('Meld: {} by {}'.format(meld, meld.who))
Expand All @@ -320,7 +324,6 @@ def start_game(self):
# we had to do discard after this
if meld.who == 0:
if meld.type != Meld.KAN and meld.type != Meld.CHANKAN:
player_formatted_hand = main_player.format_hand_for_print(meld_tile)
discarded_tile = self.player.discard_tile(discard_option)

logger.info('With hand: {}'.format(player_formatted_hand))
Expand Down

0 comments on commit 18bfb00

Please sign in to comment.