summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-25 13:29:45 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-25 13:29:45 (GMT)
commit4a4523e13f5fd2a8a62f1f88fb6aaec529b27907 (patch)
tree4285cc64ca9c6a0a656ffff48ebf429589185233
parent6dcecef243f96634b7c34cf567d0aaa3c34c373a (diff)
Player.computeHand: clarify code
-rw-r--r--src/player.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/player.py b/src/player.py
index 2991c2f..e2afaa7 100644
--- a/src/player.py
+++ b/src/player.py
@@ -393,11 +393,11 @@ class Player(StrMixin):
def computeHand(self):
"""returns Hand for this player"""
assert not (self._concealedMelds and self._concealedTiles)
- melds = ['R' + ''.join(str(x) for x in sorted(self._concealedTiles))]
- if melds[0] == 'R':
- melds = melds[1:]
+ melds = list()
melds.extend(str(x) for x in self._exposedMelds)
melds.extend(str(x) for x in self._concealedMelds)
+ if self._concealedTiles:
+ melds.append('R' + ''.join(str(x) for x in sorted(self._concealedTiles)))
melds.extend(str(x) for x in self._bonusTiles)
melds.append(self.mjString())
if self.lastTile: