Commit 6551b3bd authored by Wolfgang Rohdewald's avatar Wolfgang Rohdewald
Browse files

Blessing of Heaven: lastTile must be None and no exposed tiles

parent 78577c49
......@@ -1282,7 +1282,8 @@ class BlessingOfHeaven(RuleCode):
return False
if hand.ownWind is not East:
return False
assert hand.lastTile.isConcealed, '{}: Blessing of Heaven: last tile must be concealed'.format(hand)
assert not any(x.isExposed for x in hand.melds)
assert hand.lastTile is None, '{}: Blessing of Heaven: There can be no last tile'.format(hand)
return True
def selectable(hand):
......
......@@ -705,11 +705,11 @@ class Blessing(Base):
"""blessing of heaven or earth"""
def testMe(self):
self.scoreTest('s4s5s6 RS1S2S3B6B6B7B7B8B8 b5b5 fn yn m1 LS1S1S2S3',
self.scoreTest('s4s5s6 RS1S2S3B6B6B7B7B8B8 b5b5 fn yn m1',
[Win(limits=1), NoWin()])
self.scoreTest('s4s5s6 RS1S2S3B6B6B7B7B8B8 b5b5 fn yn m1 LS1S1S2S3',
self.scoreTest('s4s5s6 RS1S2S3B6B6B7B7B8B8 b5b5 fn yn m1',
[Win(limits=1), NoWin()])
self.scoreTest('s4s5s6 RS1S1S1B6B6B6B8B8B8 b5b5 fn yn m1 LS1S1S1S1',
self.scoreTest('s4s5s6 RS1S1S1B6B6B6B8B8B8 b5b5 fn yn m1',
Win(limits=1))
self.scoreTest('s4s5s6 RS1S2S3B6B6B7B7B8B8 b5b5 fn yn m1 Ls4s4s5s6',
[Win(limits=1), NoWin()], myWind=West)
......
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