mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
2to3 on pysollib/games/mahjongg/*.py
This commit is contained in:
parent
ea0008d745
commit
4d963e3f59
6 changed files with 17 additions and 14 deletions
|
@ -20,7 +20,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# ---------------------------------------------------------------------------##
|
# ---------------------------------------------------------------------------##
|
||||||
import mahjongg1
|
from . import mahjongg1
|
||||||
import mahjongg2
|
from . import mahjongg2
|
||||||
import mahjongg3
|
from . import mahjongg3
|
||||||
import shisensho
|
from . import shisensho
|
||||||
|
|
|
@ -468,10 +468,10 @@ class AbstractMahjonggGame(Game):
|
||||||
assert tilemap.get((level, tx, ty+1)) is stack
|
assert tilemap.get((level, tx, ty+1)) is stack
|
||||||
assert tilemap.get((level, tx+1, ty+1)) is stack
|
assert tilemap.get((level, tx+1, ty+1)) is stack
|
||||||
#
|
#
|
||||||
above = tuple(filter(None, above.keys()))
|
above = tuple([_f for _f in above.keys() if _f])
|
||||||
below = tuple(filter(None, below.keys()))
|
below = tuple([_f for _f in below.keys() if _f])
|
||||||
left = tuple(filter(None, left.keys()))
|
left = tuple([_f for _f in left.keys() if _f])
|
||||||
right = tuple(filter(None, right.keys()))
|
right = tuple([_f for _f in right.keys() if _f])
|
||||||
# up = tuple(filter(None, up.keys()))
|
# up = tuple(filter(None, up.keys()))
|
||||||
# bottom = tuple(filter(None, bottom.keys()))
|
# bottom = tuple(filter(None, bottom.keys()))
|
||||||
|
|
||||||
|
@ -1020,7 +1020,8 @@ def r(id, short_name, name=None, ncards=144, layout=None):
|
||||||
gi = GameInfo(id, gameclass, name,
|
gi = GameInfo(id, gameclass, name,
|
||||||
GI.GT_MAHJONGG, 4*decks, 0, # GI.SL_MOSTLY_SKILL,
|
GI.GT_MAHJONGG, 4*decks, 0, # GI.SL_MOSTLY_SKILL,
|
||||||
category=GI.GC_MAHJONGG, short_name=short_name,
|
category=GI.GC_MAHJONGG, short_name=short_name,
|
||||||
suits=range(3), ranks=range(ranks), trumps=range(trumps),
|
suits=list(range(3)), ranks=list(range(ranks)),
|
||||||
|
trumps=list(range(trumps)),
|
||||||
si={"decks": decks, "ncards": ncards})
|
si={"decks": decks, "ncards": ncards})
|
||||||
gi.ncards = ncards
|
gi.ncards = ncards
|
||||||
gi.rules_filename = "mahjongg.html"
|
gi.rules_filename = "mahjongg.html"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#
|
#
|
||||||
# ---------------------------------------------------------------------------##
|
# ---------------------------------------------------------------------------##
|
||||||
|
|
||||||
from mahjongg import r
|
from pysollib.games.mahjongg.mahjongg import r
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * game definitions
|
# * game definitions
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
# http://www.kyodai.com/index.en.html
|
# http://www.kyodai.com/index.en.html
|
||||||
# http://files.cyna.net/layouts.zip
|
# http://files.cyna.net/layouts.zip
|
||||||
|
|
||||||
from mahjongg import r
|
from pysollib.games.mahjongg.mahjongg import r
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * game definitions
|
# * game definitions
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#
|
#
|
||||||
# ---------------------------------------------------------------------------##
|
# ---------------------------------------------------------------------------##
|
||||||
|
|
||||||
from mahjongg import r
|
from pysollib.games.mahjongg.mahjongg import r
|
||||||
|
|
||||||
# test
|
# test
|
||||||
# r(5991, "AAA 1", ncards=4, layout="0daa")
|
# r(5991, "AAA 1", ncards=4, layout="0daa")
|
||||||
|
|
|
@ -36,7 +36,8 @@ from pysollib.layout import Layout
|
||||||
from pysollib.hint import AbstractHint
|
from pysollib.hint import AbstractHint
|
||||||
from pysollib.pysoltk import MfxCanvasText, MfxCanvasLine
|
from pysollib.pysoltk import MfxCanvasText, MfxCanvasLine
|
||||||
|
|
||||||
from mahjongg import Mahjongg_RowStack, AbstractMahjonggGame, comp_cardset
|
from pysollib.games.mahjongg.mahjongg import Mahjongg_RowStack, \
|
||||||
|
AbstractMahjonggGame, comp_cardset
|
||||||
|
|
||||||
from pysollib.util import ANY_SUIT
|
from pysollib.util import ANY_SUIT
|
||||||
|
|
||||||
|
@ -513,7 +514,8 @@ def r(id, gameclass, name, rules_filename="shisensho.html"):
|
||||||
gi = GameInfo(id, gameclass, name,
|
gi = GameInfo(id, gameclass, name,
|
||||||
GI.GT_SHISEN_SHO, 4*decks, 0, GI.SL_MOSTLY_SKILL,
|
GI.GT_SHISEN_SHO, 4*decks, 0, GI.SL_MOSTLY_SKILL,
|
||||||
category=GI.GC_MAHJONGG, short_name=name,
|
category=GI.GC_MAHJONGG, short_name=name,
|
||||||
suits=range(3), ranks=range(ranks), trumps=range(trumps),
|
suits=list(range(3)), ranks=list(range(ranks)),
|
||||||
|
trumps=list(range(trumps)),
|
||||||
si={"decks": decks, "ncards": gameclass.NCARDS})
|
si={"decks": decks, "ncards": gameclass.NCARDS})
|
||||||
gi.ncards = gameclass.NCARDS
|
gi.ncards = gameclass.NCARDS
|
||||||
gi.rules_filename = rules_filename
|
gi.rules_filename = rules_filename
|
||||||
|
|
Loading…
Add table
Reference in a new issue