1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

2to3 on pysollib/games/*/*.py

This commit is contained in:
Shlomi Fish 2017-05-22 00:31:02 +03:00
parent 54946fabca
commit ae582a6c46
9 changed files with 31 additions and 30 deletions

View file

@ -20,11 +20,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# ---------------------------------------------------------------------------##
import dashavatara
import hanafuda
import hanafuda1
import hexadeck
import larasgame
import matrix
import mughal
import tarock
from . import dashavatara
from . import hanafuda
from . import hanafuda1
from . import hexadeck
from . import larasgame
from . import matrix
from . import mughal
from . import tarock

View file

@ -1286,7 +1286,7 @@ class Dashavatara(Game):
def r(id, gameclass, name, game_type, decks, redeals, skill_level):
game_type = game_type | GI.GT_DASHAVATARA_GANJIFA
gi = GameInfo(id, gameclass, name, game_type, decks, redeals, skill_level,
suits=range(10), ranks=range(12))
suits=list(range(10)), ranks=list(range(12)))
registerGame(gi)
return gi

View file

@ -33,7 +33,7 @@ from pysollib.layout import Layout
from pysollib.hint import FreeCellType_Hint
from pysollib.pysoltk import MfxCanvasText
from hanafuda_common import \
from pysollib.games.ultra.hanafuda_common import \
FlowerClock_Foundation, \
FlowerClock_RowStack, \
FourWinds_Foundation, \
@ -1044,7 +1044,7 @@ class Paulownia(AbstractFlowerGame):
def r(id, gameclass, name, game_type, decks, redeals, skill_level):
game_type = game_type | GI.GT_HANAFUDA
gi = GameInfo(id, gameclass, name, game_type, decks, redeals, skill_level,
suits=range(12), ranks=range(4))
suits=list(range(12)), ranks=list(range(4)))
registerGame(gi)
return gi

View file

@ -32,7 +32,7 @@ from pysollib.layout import Layout
from pysollib.hint import AbstractHint, CautiousDefaultHint
from pysollib.pysoltk import MfxCanvasText
from hanafuda_common import \
from pysollib.games.ultra.hanafuda_common import \
Flower_OpenStack, \
FlowerClock_RowStack, \
HanafudaRK_RowStack, \
@ -618,7 +618,7 @@ class FlowerArrangement_TableauStack(Flower_OpenStack):
if not self.basicAcceptsCards(from_stack, cards):
return 0
# check that the base card is correct
suits = range(self.cap.mod, (self.cap.mod + 4))
suits = list(range(self.cap.mod, (self.cap.mod + 4)))
if self.cards and (self.cards[0].rank == 3
and self.cards[-1].suit in suits):
return self.isHanafudaSequence([self.cards[-1], cards[0]])
@ -723,7 +723,7 @@ class FlowerArrangement(Game):
def r(id, gameclass, name, game_type, decks, redeals, skill_level):
game_type = game_type | GI.GT_HANAFUDA
gi = GameInfo(id, gameclass, name, game_type, decks, redeals, skill_level,
suits=range(12), ranks=range(4))
suits=list(range(12)), ranks=list(range(4)))
registerGame(gi)
return gi

View file

@ -1451,7 +1451,8 @@ class Snakestone(Convolution):
def r(id, gameclass, name, game_type, decks, redeals, skill_level):
game_type = game_type | GI.GT_HEXADECK
gi = GameInfo(id, gameclass, name, game_type, decks, redeals, skill_level,
suits=range(4), ranks=range(16), trumps=range(4))
suits=list(range(4)), ranks=list(range(16)),
trumps=list(range(4)))
registerGame(gi)
return gi

View file

@ -281,37 +281,37 @@ class DoubleDojoujisGame(DojoujisGame):
# register the game
registerGame(GameInfo(13001, KatrinasGame, "Katrina's Game",
GI.GT_TAROCK, 2, 1, GI.SL_BALANCED,
ranks=range(14), trumps=range(22)))
ranks=list(range(14)), trumps=list(range(22))))
registerGame(GameInfo(13002, BridgetsGame, "Bridget's Game",
GI.GT_HEXADECK, 2, 1, GI.SL_BALANCED,
ranks=range(16), trumps=range(4)))
ranks=list(range(16)), trumps=list(range(4))))
registerGame(GameInfo(13003, FatimehsGame, "Fatimeh's Game",
GI.GT_MUGHAL_GANJIFA, 1, 2, GI.SL_BALANCED,
suits=range(8), ranks=range(12)))
suits=list(range(8)), ranks=list(range(12))))
registerGame(GameInfo(13004, KalisGame, "Kali's Game",
GI.GT_DASHAVATARA_GANJIFA, 1, 2, GI.SL_BALANCED,
suits=range(10), ranks=range(12)))
suits=list(range(10)), ranks=list(range(12))))
registerGame(GameInfo(13005, DojoujisGame, "Dojouji's Game",
GI.GT_HANAFUDA, 2, 0, GI.SL_BALANCED,
suits=range(12), ranks=range(4)))
suits=list(range(12)), ranks=list(range(4))))
registerGame(GameInfo(13008, RelaxedKatrinasGame, "Katrina's Game Relaxed",
GI.GT_TAROCK, 2, 1, GI.SL_BALANCED,
ranks=range(14), trumps=range(22)))
ranks=list(range(14)), trumps=list(range(22))))
registerGame(GameInfo(13009, DoubleKatrinasGame, "Katrina's Game Doubled",
GI.GT_TAROCK, 4, 2, GI.SL_BALANCED,
ranks=range(14), trumps=range(22)))
ranks=list(range(14)), trumps=list(range(22))))
registerGame(GameInfo(13010, DoubleBridgetsGame, "Bridget's Game Doubled",
GI.GT_HEXADECK, 4, 2, GI.SL_BALANCED,
ranks=range(16), trumps=range(4)))
ranks=list(range(16)), trumps=list(range(4))))
registerGame(GameInfo(13011, RelaxedKalisGame, "Kali's Game Relaxed",
GI.GT_DASHAVATARA_GANJIFA, 1, 2, GI.SL_BALANCED,
suits=range(10), ranks=range(12)))
suits=list(range(10)), ranks=list(range(12))))
registerGame(GameInfo(13012, DoubleKalisGame, "Kali's Game Doubled",
GI.GT_DASHAVATARA_GANJIFA, 2, 3, GI.SL_BALANCED,
suits=range(10), ranks=range(12)))
suits=list(range(10)), ranks=list(range(12))))
registerGame(GameInfo(13013, RelaxedFatimehsGame, "Fatimeh's Game Relaxed",
GI.GT_MUGHAL_GANJIFA, 1, 2, GI.SL_BALANCED,
suits=range(8), ranks=range(12)))
suits=list(range(8)), ranks=list(range(12))))
registerGame(GameInfo(13014, DoubleDojoujisGame, "Dojouji's Game Doubled",
GI.GT_HANAFUDA, 4, 0, GI.SL_BALANCED,
suits=range(12), ranks=range(4)))
suits=list(range(12)), ranks=list(range(4))))

View file

@ -250,7 +250,7 @@ def r(id, gameclass, short_name):
id, gameclass, name,
GI.GT_MATRIX, 1, 0, GI.SL_SKILL,
category=GI.GC_TRUMP_ONLY, short_name=short_name,
suits=(), ranks=(), trumps=range(ncards),
suits=(), ranks=(), trumps=list(range(ncards)),
si={"decks": 1, "ncards": ncards})
gi.ncards = ncards
gi.rules_filename = "matrix.html"

View file

@ -1177,7 +1177,7 @@ class AshtaDikapala(Game):
def r(id, gameclass, name, game_type, decks, redeals, skill_level):
game_type = game_type | GI.GT_MUGHAL_GANJIFA
gi = GameInfo(id, gameclass, name, game_type, decks, redeals, skill_level,
suits=range(8), ranks=range(12))
suits=list(range(8)), ranks=list(range(12)))
registerGame(gi)
return gi

View file

@ -289,7 +289,7 @@ class LeGrandeTeton(ThreePeaksNoScore):
def r(id, gameclass, name, game_type, decks, redeals, skill_level):
game_type = game_type | GI.GT_TAROCK | GI.GT_CONTRIB | GI.GT_ORIGINAL
gi = GameInfo(id, gameclass, name, game_type, decks, redeals, skill_level,
ranks=range(14), trumps=range(22))
ranks=list(range(14)), trumps=list(range(22)))
registerGame(gi)
return gi