summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2015-11-24 14:17:59 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-25 06:39:21 (GMT)
commited8540571c267f0b034bf8b8384463822f85b238 (patch)
tree517dea1c4928cbe2a52514e8c6257fed7d3c80fe
parent69942725c061c262c64c6bdc1ead15c07899f89a (diff)
Hand.__sub__: prepare for multiple announcements
-rw-r--r--src/hand.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/hand.py b/src/hand.py
index 09f3511..9195933 100644
--- a/src/hand.py
+++ b/src/hand.py
@@ -461,8 +461,15 @@ class Hand(object):
tilesInHand.extend(meld.concealed)
newParts = []
for idx, part in enumerate(self.mjStr.split()):
+ oldPart = part
if part[0] == 'm':
- continue
+ part = part[:2] + part[2:].replace('k','')
+ # TODO: remove debug output again
+ if part != oldPart:
+ self.debug('Hand.__sub__ changes m part from {} to {}'.format(oldPart,part))
+ if len(part)<3:
+ # no announcement left
+ continue
elif part[0] == 'L':
if (self.lastTile.isExposed
and self.lastTile.concealed in tilesInHand):