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

Commit d73b452

Browse files
committed
Print formatted dora indicators
1 parent 4f8afea commit d73b452

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

project/mahjong/table.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from mahjong.constants import EAST, SOUTH, WEST, NORTH
33
from mahjong.meld import Meld
44
from mahjong.player import Player, EnemyPlayer
5-
from mahjong.tile import Tile
5+
from mahjong.tile import Tile, TilesConverter
66
from mahjong.utils import plus_dora, is_aka_dora
77

88

@@ -35,9 +35,10 @@ def __init__(self, previous_ai=False):
3535
self.revealed_tiles = [0] * 34
3636

3737
def __str__(self):
38+
dora_string = TilesConverter.to_one_line_string(self.dora_indicators)
3839
return 'Round: {0}, Honba: {1}, Dora Indicators: {2}'.format(self.round_number,
3940
self.count_of_honba_sticks,
40-
self.dora_indicators)
41+
dora_string)
4142

4243
def init_round(self, round_number, count_of_honba_sticks, count_of_riichi_sticks,
4344
dora_indicator, dealer_seat, scores):

0 commit comments

Comments
 (0)