Skip to content

Commit

Permalink
Add feature: GUI
Browse files Browse the repository at this point in the history
The TableDisplay should be rewritten if developer wants to localise information shown in the GUI.
  • Loading branch information
Thomas committed Oct 4, 2018
1 parent 0a70059 commit 87dedb1
Show file tree
Hide file tree
Showing 48 changed files with 2,636 additions and 6 deletions.
8 changes: 4 additions & 4 deletions client/tenhou_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,6 @@ def _handle_initial_msg(self, msg):

# display in GUI
if self.drawer:
names = [self.game_table.get_player(i).name for i in range(0, 4)]
scores = [self.game_table.get_player(i).score for i in range(0, 4)]
levels = [self.game_table.get_player(i).level for i in range(0, 4)]
self.drawer.add_name_and_scores(names, scores, levels)
self.drawer.init_hand(tiles)
self.drawer.init_round_info(
init_info['round_number'] + 1,
Expand All @@ -330,6 +326,10 @@ def _handle_initial_msg(self, msg):
)
for indicator in init_info['bonus_tile_indicator']:
self.drawer.add_bonus_indicator(indicator)
names = [self.game_table.get_player(i).name for i in range(0, 4)]
scores = [self.game_table.get_player(i).score for i in range(0, 4)]
levels = [self.game_table.get_player(i).level for i in range(0, 4)]
self.drawer.add_name_and_scores(names, scores, levels)

# display initial message in logs
self._log(' ' + '-' * 50)
Expand Down
Binary file added client/tilespng/0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/23.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/25.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/26.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/27.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/28.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/30.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/tilespng/31.png
Binary file added client/tilespng/32.png
Binary file added client/tilespng/33.png
Binary file added client/tilespng/34.png
Binary file added client/tilespng/35.png
Binary file added client/tilespng/36.png
Binary file added client/tilespng/37.png
Binary file added client/tilespng/4.png
Binary file added client/tilespng/5.png
Binary file added client/tilespng/6.png
Binary file added client/tilespng/7.png
Binary file added client/tilespng/8.png
Binary file added client/tilespng/9.png
Binary file added client/tilespng/bg1.jpg
Binary file added client/tilespng/bg2.jpg
Loading

0 comments on commit 87dedb1

Please sign in to comment.