Skip to content
GitLab
Menu
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
f856d336
Commit
f856d336
authored
Apr 05, 2021
by
Wolfgang Rohdewald
Browse files
simplify if-tree, neutral
parent
4a8f1061
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/game.py
View file @
f856d336
...
...
@@ -79,14 +79,15 @@ class HandId(StrMixin):
if
not
string1
:
logException
(
'--game=%s must specify the wanted round'
%
string
)
parts
=
string1
.
split
(
'..'
)
if
stringIdx
==
1
and
len
(
parts
)
==
2
and
parts
[
1
]
==
''
:
self
.
roundsFinished
=
100
return
if
stringIdx
==
0
and
len
(
parts
)
==
2
and
parts
[
0
]
==
''
:
return
if
stringIdx
==
1
and
len
(
parts
)
==
2
and
parts
[
1
]
==
''
:
self
.
roundsFinished
=
100
return
if
len
(
parts
)
==
2
:
if
stringIdx
==
1
and
parts
[
1
]
==
''
:
self
.
roundsFinished
=
100
return
if
stringIdx
==
0
and
parts
[
0
]
==
''
:
return
if
stringIdx
==
1
and
parts
[
1
]
==
''
:
self
.
roundsFinished
=
100
return
handId
=
parts
[
min
(
stringIdx
,
len
(
parts
)
-
1
)]
if
handId
[
0
].
lower
()
not
in
'eswn'
:
logException
(
'--game=%s must specify the round wind'
%
string
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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