From 54946fabcaff28be850cdf4460147c4b76dd586f Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Mon, 22 May 2017 00:15:22 +0300 Subject: [PATCH] 2to3 on pysollib/games/special/*.py --- pysollib/games/special/__init__.py | 10 +++++----- pysollib/games/special/hanoi.py | 10 +++++----- pysollib/games/special/pegged.py | 2 +- pysollib/games/special/poker.py | 2 +- pysollib/games/special/tarock.py | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pysollib/games/special/__init__.py b/pysollib/games/special/__init__.py index 1c9589c7..aca4f6d4 100644 --- a/pysollib/games/special/__init__.py +++ b/pysollib/games/special/__init__.py @@ -20,11 +20,11 @@ # along with this program. If not, see . # # ---------------------------------------------------------------------------## -import hanoi -import memory -import pegged -import poker -import tarock +from . import hanoi +from . import memory +from . import pegged +from . import poker +from . import tarock def no_use(): pass diff --git a/pysollib/games/special/hanoi.py b/pysollib/games/special/hanoi.py index b26a6793..8b4ad292 100644 --- a/pysollib/games/special/hanoi.py +++ b/pysollib/games/special/hanoi.py @@ -157,19 +157,19 @@ class HanoiSequence(TowerOfHanoy): # register the game registerGame(GameInfo(124, TowerOfHanoy, "Tower of Hanoy", GI.GT_PUZZLE_TYPE, 1, 0, GI.SL_SKILL, - suits=(2,), ranks=range(9))) + suits=(2,), ranks=list(range(9)))) registerGame(GameInfo(207, HanoiPuzzle4, "Hanoi Puzzle 4", GI.GT_PUZZLE_TYPE, 1, 0, GI.SL_SKILL, - suits=(2,), ranks=range(4), + suits=(2,), ranks=list(range(4)), rules_filename="hanoipuzzle.html")) registerGame(GameInfo(208, HanoiPuzzle5, "Hanoi Puzzle 5", GI.GT_PUZZLE_TYPE, 1, 0, GI.SL_SKILL, - suits=(2,), ranks=range(5), + suits=(2,), ranks=list(range(5)), rules_filename="hanoipuzzle.html")) registerGame(GameInfo(209, HanoiPuzzle6, "Hanoi Puzzle 6", GI.GT_PUZZLE_TYPE, 1, 0, GI.SL_SKILL, - suits=(2,), ranks=range(6), + suits=(2,), ranks=list(range(6)), rules_filename="hanoipuzzle.html")) registerGame(GameInfo(769, HanoiSequence, "Hanoi Sequence", GI.GT_PUZZLE_TYPE, 1, 0, GI.SL_SKILL, - suits=(2,), ranks=range(9))) + suits=(2,), ranks=list(range(9)))) diff --git a/pysollib/games/special/pegged.py b/pysollib/games/special/pegged.py index 11fade07..236e0d22 100644 --- a/pysollib/games/special/pegged.py +++ b/pysollib/games/special/pegged.py @@ -259,7 +259,7 @@ def r(id, gameclass, name): gi = GameInfo(id, gameclass, name, GI.GT_PUZZLE_TYPE, 1, 0, GI.SL_SKILL, category=GI.GC_TRUMP_ONLY, - suits=(), ranks=(), trumps=range(ncards), + suits=(), ranks=(), trumps=list(range(ncards)), si={"decks": 1, "ncards": ncards}, rules_filename="pegged.html") registerGame(gi) diff --git a/pysollib/games/special/poker.py b/pysollib/games/special/poker.py index 2fb210c6..a552da71 100644 --- a/pysollib/games/special/poker.py +++ b/pysollib/games/special/poker.py @@ -145,7 +145,7 @@ One Pair''')) (r[3], r[3+5], r[3+10], r[3+15], r[3+20]), (r[4], r[4+5], r[4+10], r[4+15], r[4+20]), ] - self.poker_hands = map(tuple, self.poker_hands) + self.poker_hands = list(map(tuple, self.poker_hands)) # define stack-groups l.defaultStackGroups() diff --git a/pysollib/games/special/tarock.py b/pysollib/games/special/tarock.py index 353fe4be..841ffe8a 100644 --- a/pysollib/games/special/tarock.py +++ b/pysollib/games/special/tarock.py @@ -932,7 +932,7 @@ class Nasty(Wicked): 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