Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
Kajongg
Commits
6551b3bd
Commit
6551b3bd
authored
Jan 15, 2022
by
Wolfgang Rohdewald
Browse files
Blessing of Heaven: lastTile must be None and no exposed tiles
parent
78577c49
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/rulecode.py
View file @
6551b3bd
...
...
@@ -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
):
...
...
src/scoringtest.py
View file @
6551b3bd
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment