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

Commit

Permalink
Issue #31. Fix an issue with called meld wrong log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Nihisil committed Jun 21, 2017
1 parent 36bb15a commit d0eccdd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions project/tenhou/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,15 @@ 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:
logger.info('With hand: {}'.format(main_player.format_hand_for_print(meld_tile)))
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))
logger.info('Discard tile after called meld: {}'.format(
TilesConverter.to_one_line_string([discard_option.tile_to_discard])))
TilesConverter.to_one_line_string([discarded_tile]))
)

self.player.tiles.append(meld_tile)
discarded_tile = self.player.discard_tile(discard_option)

self._send_message('<D p="{}"/>'.format(discarded_tile))

win_suggestions = ['t="8"', 't="9"', 't="12"', 't="13"']
Expand Down

0 comments on commit d0eccdd

Please sign in to comment.