summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2015-11-27 07:43:34 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-25 06:41:36 (GMT)
commit65d953c5cdf85b5fbaa1a8939d0da96aa7051fef (patch)
tree2f3e04a307d0ebe0319f5ef736584cbfbe5ddbcd
parenta427956e5b232775fd7846e583af4a1e28e305cd (diff)
Hand.__arrange: one more early abort for non winning long hands
-rw-r--r--src/hand.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/hand.py b/src/hand.py
index e337d88..5083925 100644
--- a/src/hand.py
+++ b/src/hand.py
@@ -610,8 +610,10 @@ class Hand(object):
if not self.__rest:
self.melds.sort()
mjRules = self.__maybeMahjongg()
- self.__won &= bool(mjRules)
- if mjRules:
+ if self.won:
+ if not mjRules:
+ # how could this ever happen?
+ raise Hand.__NotWon('Long Hand with no rest')
self.mjRule = mjRules[0]
return
wonHands = []