Commit 4a4523e1 authored by Wolfgang Rohdewald's avatar Wolfgang Rohdewald
Browse files

Player.computeHand: clarify code

parent 6dcecef2
......@@ -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)
if self.lastTile:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment