summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2015-11-22 15:00:15 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-24 10:26:50 (GMT)
commitdc266864f2263ee96ef11b2e963334d8b0683636 (patch)
tree245326f1be589f807951b76f434d0b8d203e21c8
parentb27cc5e6fc903a49b5d39b1838c4fed57e1f6745 (diff)
GatesOfHeaven/NineGates: ComputeLastMelds may only return existing melds
-rw-r--r--src/rulecode.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rulecode.py b/src/rulecode.py
index 878ef07..0972895 100644
--- a/src/rulecode.py
+++ b/src/rulecode.py
@@ -1002,10 +1002,9 @@ class EastWonNineTimesInARow(RuleCode):
class GatesOfHeaven(StandardMahJongg):
cache = ()
-# FIXME: computeLastMelds must return a real meld
# FIXME: in BMJA, 111 and 999 must be concealed, we do not check this
def computeLastMelds(hand):
- return [hand.lastTile.single]
+ return [x for x in hand.melds if hand.lastTile in x]
def shouldTry(hand, maxMissing=3):
if hand.declaredMelds: