From 2744887cd422b9e888345324680f52f11b4e11af Mon Sep 17 00:00:00 2001 From: skomoroh Date: Wed, 22 Jul 2009 21:36:22 +0000 Subject: [PATCH] * changed comments style git-svn-id: file:///home/shlomif/Backup/svn-dumps/PySolFC/svnsync-repos/pysolfc/PySolFC/trunk@243 efabe8c0-fbe8-4139-b769-b5e6d273206e --- pysollib/acard.py | 6 +- pysollib/actions.py | 12 +- pysollib/app.py | 22 +- pysollib/customgame.py | 6 +- pysollib/game.py | 16 +- pysollib/gamedb.py | 18 +- pysollib/games/acesup.py | 54 ++-- pysollib/games/algerian.py | 12 +- pysollib/games/auldlangsyne.py | 58 ++--- pysollib/games/bakersdozen.py | 58 ++--- pysollib/games/bakersgame.py | 46 ++-- pysollib/games/beleagueredcastle.py | 106 ++++---- pysollib/games/bisley.py | 44 ++-- pysollib/games/braid.py | 48 ++-- pysollib/games/bristol.py | 48 ++-- pysollib/games/buffalobill.py | 8 +- pysollib/games/calculation.py | 48 ++-- pysollib/games/camelot.py | 30 +-- pysollib/games/canfield.py | 136 +++++----- pysollib/games/capricieuse.py | 30 +-- pysollib/games/curdsandwhey.py | 60 ++--- pysollib/games/dieboesesieben.py | 6 +- pysollib/games/diplomat.py | 44 ++-- pysollib/games/doublets.py | 6 +- pysollib/games/eiffeltower.py | 12 +- pysollib/games/fan.py | 114 ++++----- pysollib/games/fortythieves.py | 220 ++++++++--------- pysollib/games/freecell.py | 110 ++++----- pysollib/games/glenwood.py | 12 +- pysollib/games/golf.py | 116 ++++----- pysollib/games/grandduchess.py | 12 +- pysollib/games/grandfathersclock.py | 36 +-- pysollib/games/gypsy.py | 158 ++++++------ pysollib/games/harp.py | 86 +++---- pysollib/games/headsandtails.py | 12 +- pysollib/games/katzenschwanz.py | 70 +++--- pysollib/games/klondike.py | 300 +++++++++++------------ pysollib/games/labyrinth.py | 6 +- pysollib/games/larasgame.py | 30 +-- pysollib/games/mahjongg/mahjongg.py | 30 +-- pysollib/games/mahjongg/mahjongg1.py | 6 +- pysollib/games/mahjongg/mahjongg2.py | 6 +- pysollib/games/mahjongg/mahjongg3.py | 6 +- pysollib/games/mahjongg/shisensho.py | 24 +- pysollib/games/matriarchy.py | 18 +- pysollib/games/montana.py | 72 +++--- pysollib/games/montecarlo.py | 82 +++---- pysollib/games/napoleon.py | 46 ++-- pysollib/games/needle.py | 10 +- pysollib/games/numerica.py | 104 ++++---- pysollib/games/osmosis.py | 38 +-- pysollib/games/parallels.py | 8 +- pysollib/games/pasdedeux.py | 12 +- pysollib/games/picturegallery.py | 44 ++-- pysollib/games/pileon.py | 26 +- pysollib/games/pushpin.py | 12 +- pysollib/games/pyramid.py | 138 +++++------ pysollib/games/royalcotillion.py | 98 ++++---- pysollib/games/royaleast.py | 6 +- pysollib/games/sanibel.py | 8 +- pysollib/games/siebenbisas.py | 18 +- pysollib/games/simplex.py | 6 +- pysollib/games/special/hanoi.py | 12 +- pysollib/games/special/memory.py | 18 +- pysollib/games/special/pegged.py | 30 +-- pysollib/games/special/poker.py | 12 +- pysollib/games/special/tarock.py | 92 +++---- pysollib/games/spider.py | 226 ++++++++--------- pysollib/games/sthelena.py | 24 +- pysollib/games/sultan.py | 130 +++++----- pysollib/games/takeaway.py | 18 +- pysollib/games/terrace.py | 58 ++--- pysollib/games/threepeaks.py | 18 +- pysollib/games/tournament.py | 24 +- pysollib/games/ultra/dashavatara.py | 70 +++--- pysollib/games/ultra/hanafuda.py | 94 +++---- pysollib/games/ultra/hanafuda1.py | 46 ++-- pysollib/games/ultra/hanafuda_common.py | 6 +- pysollib/games/ultra/hexadeck.py | 126 +++++----- pysollib/games/ultra/larasgame.py | 88 +++---- pysollib/games/ultra/matrix.py | 24 +- pysollib/games/ultra/mughal.py | 88 +++---- pysollib/games/ultra/tarock.py | 42 ++-- pysollib/games/unionsquare.py | 24 +- pysollib/games/wavemotion.py | 12 +- pysollib/games/windmill.py | 42 ++-- pysollib/games/yukon.py | 158 ++++++------ pysollib/games/zodiac.py | 12 +- pysollib/help.py | 12 +- pysollib/hint.py | 48 ++-- pysollib/images.py | 12 +- pysollib/init.py | 6 +- pysollib/layout.py | 6 +- pysollib/main.py | 24 +- pysollib/mfxutil.py | 54 ++-- pysollib/move.py | 86 +++---- pysollib/options.py | 6 +- pysollib/pysolaudio.py | 30 +-- pysollib/pysolgtk/card.py | 18 +- pysollib/pysolgtk/colorsdialog.py | 6 +- pysollib/pysolgtk/edittextdialog.py | 6 +- pysollib/pysolgtk/findcarddialog.py | 6 +- pysollib/pysolgtk/fontsdialog.py | 6 +- pysollib/pysolgtk/gameinfodialog.py | 6 +- pysollib/pysolgtk/menubar.py | 10 +- pysollib/pysolgtk/playeroptionsdialog.py | 6 +- pysollib/pysolgtk/progressbar.py | 12 +- pysollib/pysolgtk/pysoltree.py | 6 +- pysollib/pysolgtk/selectcardset.py | 6 +- pysollib/pysolgtk/selectgame.py | 6 +- pysollib/pysolgtk/soundoptionsdialog.py | 6 +- pysollib/pysolgtk/statusbar.py | 12 +- pysollib/pysolgtk/timeoutsdialog.py | 6 +- pysollib/pysolgtk/tkcanvas.py | 24 +- pysollib/pysolgtk/tkconst.py | 6 +- pysollib/pysolgtk/tkhtml.py | 24 +- pysollib/pysolgtk/tkstats.py | 18 +- pysollib/pysolgtk/tkutil.py | 38 +-- pysollib/pysolgtk/tkwidget.py | 24 +- pysollib/pysolgtk/tkwrap.py | 18 +- pysollib/pysolgtk/toolbar.py | 6 +- pysollib/pysolrandom.py | 62 ++--- pysollib/resource.py | 30 +-- pysollib/stack.py | 98 ++++---- pysollib/stats.py | 12 +- pysollib/tile/card.py | 62 ++--- pysollib/tile/colorsdialog.py | 6 +- pysollib/tile/edittextdialog.py | 6 +- pysollib/tile/findcarddialog.py | 6 +- pysollib/tile/fontsdialog.py | 12 +- pysollib/tile/gameinfodialog.py | 6 +- pysollib/tile/menubar.py | 22 +- pysollib/tile/playeroptionsdialog.py | 6 +- pysollib/tile/progressbar.py | 12 +- pysollib/tile/selectcardset.py | 30 +-- pysollib/tile/selectgame.py | 30 +-- pysollib/tile/selecttile.py | 24 +- pysollib/tile/selecttree.py | 18 +- pysollib/tile/solverdialog.py | 6 +- pysollib/tile/soundoptionsdialog.py | 6 +- pysollib/tile/statusbar.py | 12 +- pysollib/tile/timeoutsdialog.py | 6 +- pysollib/tile/tkcanvas.py | 12 +- pysollib/tile/tkconst.py | 6 +- pysollib/tile/tkhtml.py | 24 +- pysollib/tile/tkstats.py | 54 ++-- pysollib/tile/tktree.py | 24 +- pysollib/tile/tkutil.py | 36 +-- pysollib/tile/tkwidget.py | 60 ++--- pysollib/tile/tkwrap.py | 8 +- pysollib/tile/toolbar.py | 12 +- pysollib/tile/wizarddialog.py | 6 +- pysollib/tk/card.py | 62 ++--- pysollib/tk/colorsdialog.py | 6 +- pysollib/tk/edittextdialog.py | 6 +- pysollib/tk/findcarddialog.py | 6 +- pysollib/tk/fontsdialog.py | 12 +- pysollib/tk/gameinfodialog.py | 6 +- pysollib/tk/menubar.py | 22 +- pysollib/tk/playeroptionsdialog.py | 12 +- pysollib/tk/progressbar.py | 12 +- pysollib/tk/selectcardset.py | 30 +-- pysollib/tk/selectgame.py | 30 +-- pysollib/tk/selecttile.py | 24 +- pysollib/tk/selecttree.py | 18 +- pysollib/tk/solverdialog.py | 6 +- pysollib/tk/soundoptionsdialog.py | 6 +- pysollib/tk/statusbar.py | 12 +- pysollib/tk/timeoutsdialog.py | 6 +- pysollib/tk/tkcanvas.py | 12 +- pysollib/tk/tkconst.py | 6 +- pysollib/tk/tkhtml.py | 24 +- pysollib/tk/tkstats.py | 42 ++-- pysollib/tk/tktree.py | 24 +- pysollib/tk/tkutil.py | 36 +-- pysollib/tk/tkwidget.py | 48 ++-- pysollib/tk/tkwrap.py | 8 +- pysollib/tk/toolbar.py | 12 +- pysollib/tk/wizarddialog.py | 6 +- pysollib/util.py | 12 +- pysollib/winsystems/x11.py | 6 +- pysollib/wizardutil.py | 6 +- 182 files changed, 3160 insertions(+), 3160 deletions(-) diff --git a/pysollib/acard.py b/pysollib/acard.py index dadcf3a1..8ac035b8 100644 --- a/pysollib/acard.py +++ b/pysollib/acard.py @@ -28,9 +28,9 @@ from random import randint # PySol imports from mfxutil import SubclassResponsibility -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class AbstractCard: # A playing card. diff --git a/pysollib/actions.py b/pysollib/actions.py index ea5afcc9..de0e7450 100644 --- a/pysollib/actions.py +++ b/pysollib/actions.py @@ -57,9 +57,9 @@ from pysoltk import PysolMenubarTk, PysolToolbarTk from help import help_about, help_html -# /*********************************************************************** -# // menubar -# ************************************************************************/ +# ************************************************************************ +# * menubar +# ************************************************************************ class PysolMenubar(PysolMenubarTk): def __init__(self, app, top, progress=None): @@ -784,9 +784,9 @@ class PysolMenubar(PysolMenubarTk): self.top.wm_iconify() -# /*********************************************************************** -# // toolbar -# ************************************************************************/ +# ************************************************************************ +# * toolbar +# ************************************************************************ class PysolToolbar(PysolToolbarTk): def __init__(self, *args, **kwargs): diff --git a/pysollib/app.py b/pysollib/app.py index 57410b3e..e724a3a0 100644 --- a/pysollib/app.py +++ b/pysollib/app.py @@ -62,9 +62,9 @@ from actions import PysolToolbar from help import help_about, destroy_help_html -# /*********************************************************************** -# // Statistics -# ************************************************************************/ +# ************************************************************************ +# * Statistics +# ************************************************************************ class _GameStatResult: def __init__(self): @@ -286,9 +286,9 @@ class Statistics: ## self.__dict__.update(state) -# /*********************************************************************** -# // Comments -# ************************************************************************/ +# ************************************************************************ +# * Comments +# ************************************************************************ class Comments: def __init__(self): @@ -311,11 +311,11 @@ class Comments: return self.comments.get(key, "") -# /*********************************************************************** -# // Application -# // This is the glue between the toplevel window and a Game. -# // Also handles all global resources. -# ************************************************************************/ +# ************************************************************************ +# * Application +# * This is the glue between the toplevel window and a Game. +# * Also handles all global resources. +# ************************************************************************ class Application: def __init__(self): diff --git a/pysollib/customgame.py b/pysollib/customgame.py index 1567d59e..9f49f581 100644 --- a/pysollib/customgame.py +++ b/pysollib/customgame.py @@ -31,9 +31,9 @@ from hint import AbstractHint, DefaultHint, CautiousDefaultHint, Yukon_Hint from wizardutil import WizardWidgets -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ def get_settings(ss): s = {} diff --git a/pysollib/game.py b/pysollib/game.py index c22dfb8b..3c7161db 100644 --- a/pysollib/game.py +++ b/pysollib/game.py @@ -58,14 +58,14 @@ from help import help_about PLAY_TIME_TIMEOUT = 200 -# /*********************************************************************** -# // Base class for all solitaire games -# // -# // Handles: -# // load/save -# // undo/redo (using a move history) -# // hints/demo -# ************************************************************************/ +# ************************************************************************ +# * Base class for all solitaire games +# * +# * Handles: +# * load/save +# * undo/redo (using a move history) +# * hints/demo +# ************************************************************************ class Game: # for self.gstats.updated diff --git a/pysollib/gamedb.py b/pysollib/gamedb.py index 965903ab..94e3d404 100644 --- a/pysollib/gamedb.py +++ b/pysollib/gamedb.py @@ -31,9 +31,9 @@ from resource import CSI import settings -# /*********************************************************************** -# // constants -# ************************************************************************/ +# ************************************************************************ +# * constants +# ************************************************************************ # GameInfo constants class GI: @@ -387,9 +387,9 @@ class GI: ] -# /*********************************************************************** -# // core games database -# ************************************************************************/ +# ************************************************************************ +# * core games database +# ************************************************************************ class GameInfoException(Exception): pass @@ -637,9 +637,9 @@ class GameManager: return self.__games_for_solver -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ # the global game database (the single instance of class GameManager) GAME_DB = GameManager() diff --git a/pysollib/games/acesup.py b/pysollib/games/acesup.py index 4fa5a12e..74457142 100644 --- a/pysollib/games/acesup.py +++ b/pysollib/games/acesup.py @@ -37,9 +37,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from montecarlo import MonteCarlo_RowStack -# /*********************************************************************** -# // Aces Up -# ************************************************************************/ +# ************************************************************************ +# * Aces Up +# ************************************************************************ class AcesUp_Foundation(AbstractFoundationStack): def acceptsCards(self, from_stack, cards): @@ -128,17 +128,17 @@ class AcesUp(Game): return (self.sg.dropstacks, self.sg.dropstacks, self.sg.dropstacks) -# /*********************************************************************** -# // Fortunes -# ************************************************************************/ +# ************************************************************************ +# * Fortunes +# ************************************************************************ class Fortunes(AcesUp): RowStack_Class = StackWrapper(AcesUp_RowStack, max_move=UNLIMITED_MOVES, max_accept=UNLIMITED_ACCEPTS) -# /*********************************************************************** -# // Russian Aces -# ************************************************************************/ +# ************************************************************************ +# * Russian Aces +# ************************************************************************ class RussianAces_Talon(DealRowTalonStack): def dealCards(self, sound=False): @@ -152,9 +152,9 @@ class RussianAces(AcesUp): Talon_Class = RussianAces_Talon -# /*********************************************************************** -# // Perpetual Motion -# ************************************************************************/ +# ************************************************************************ +# * Perpetual Motion +# ************************************************************************ class PerpetualMotion_Talon(DealRowTalonStack): def canDealCards(self): @@ -246,9 +246,9 @@ class PerpetualMotion(Game): return card1.rank == card2.rank -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class AcesUp5(AcesUp): @@ -259,10 +259,10 @@ class AcesUp5(AcesUp): return len(self.s.foundations[0].cards) == 48 -# /*********************************************************************** -# // Cover -# // Deck -# ************************************************************************/ +# ************************************************************************ +# * Cover +# * Deck +# ************************************************************************ class Cover_RowStack(MonteCarlo_RowStack): def acceptsCards(self, from_stack, cards): @@ -303,9 +303,9 @@ class Deck(Cover): pass -# /*********************************************************************** -# // Firing Squad -# ************************************************************************/ +# ************************************************************************ +# * Firing Squad +# ************************************************************************ class FiringSquad_Foundation(AcesUp_Foundation): def acceptsCards(self, from_stack, cards): @@ -320,11 +320,11 @@ class FiringSquad(AcesUp): AcesUp.createGame(self, reserve=True) -# /*********************************************************************** -# // Tabby Cat -# // Manx -# // Maine Coon -# ************************************************************************/ +# ************************************************************************ +# * Tabby Cat +# * Manx +# * Maine Coon +# ************************************************************************ class TabbyCatStack(RK_RowStack): def acceptsCards(self, from_stack, cards): diff --git a/pysollib/games/algerian.py b/pysollib/games/algerian.py index 841dee18..01f5fe3f 100644 --- a/pysollib/games/algerian.py +++ b/pysollib/games/algerian.py @@ -36,9 +36,9 @@ from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // Carthage -# ************************************************************************/ +# ************************************************************************ +# * Carthage +# ************************************************************************ class Carthage_Talon(DealRowTalonStack): def dealCards(self, sound=False): @@ -119,9 +119,9 @@ class Carthage(Game): shallHighlightMatch = Game._shallHighlightMatch_SSW -# /*********************************************************************** -# // Algerian Patience -# ************************************************************************/ +# ************************************************************************ +# * Algerian Patience +# ************************************************************************ class AlgerianPatience(Carthage): diff --git a/pysollib/games/auldlangsyne.py b/pysollib/games/auldlangsyne.py index 77a287e1..98c2dae1 100644 --- a/pysollib/games/auldlangsyne.py +++ b/pysollib/games/auldlangsyne.py @@ -37,9 +37,9 @@ from pysollib.pysoltk import MfxCanvasText from numerica import Numerica_Hint -# /*********************************************************************** -# // Tam O'Shanter -# ************************************************************************/ +# ************************************************************************ +# * Tam O'Shanter +# ************************************************************************ class TamOShanter(Game): Talon_Class = DealRowTalonStack @@ -91,9 +91,9 @@ class TamOShanter(Game): return ((), (), self.sg.dropstacks) -# /*********************************************************************** -# // Auld Lang Syne -# ************************************************************************/ +# ************************************************************************ +# * Auld Lang Syne +# ************************************************************************ class AuldLangSyne(TamOShanter): def _shuffleHook(self, cards): @@ -105,10 +105,10 @@ class AuldLangSyne(TamOShanter): self.startDealSample() self.s.talon.dealRow() -# /*********************************************************************** -# // Strategy -# // Strategy + -# ************************************************************************/ +# ************************************************************************ +# * Strategy +# * Strategy + +# ************************************************************************ class Strategy_Foundation(SS_FoundationStack): def acceptsCards(self, from_stack, cards): @@ -214,9 +214,9 @@ class StrategyPlus(Strategy): self.leaveState(old_state) -# /*********************************************************************** -# // Interregnum -# ************************************************************************/ +# ************************************************************************ +# * Interregnum +# ************************************************************************ class Interregnum_Foundation(RK_FoundationStack): def acceptsCards(self, from_stack, cards): @@ -307,9 +307,9 @@ class Interregnum(Game): p.dump(c.id) -# /*********************************************************************** -# // Primrose -# ************************************************************************/ +# ************************************************************************ +# * Primrose +# ************************************************************************ class Primrose_Talon(DealRowTalonStack): @@ -357,9 +357,9 @@ class Primrose(Interregnum): Interregnum.startGame(self) -# /*********************************************************************** -# // Colorado -# ************************************************************************/ +# ************************************************************************ +# * Colorado +# ************************************************************************ class Colorado_RowStack(OpenStack): def acceptsCards(self, from_stack, cards): @@ -431,9 +431,9 @@ class Colorado(Game): self.s.waste.moveMove(1, stack) -# /*********************************************************************** -# // Amazons -# ************************************************************************/ +# ************************************************************************ +# * Amazons +# ************************************************************************ class Amazons_Talon(RedealTalonStack): @@ -491,10 +491,10 @@ class Amazons(AuldLangSyne): self.s.talon.dealRow() -# /*********************************************************************** -# // Scuffle -# // Acquaintance -# ************************************************************************/ +# ************************************************************************ +# * Scuffle +# * Acquaintance +# ************************************************************************ class Scuffle_Talon(RedealTalonStack): @@ -533,9 +533,9 @@ class DoubleAcquaintance(AuldLangSyne): AuldLangSyne.createGame(self, rows=8, texts=True) -# /*********************************************************************** -# // Formic -# ************************************************************************/ +# ************************************************************************ +# * Formic +# ************************************************************************ class Formic_Foundation(AbstractFoundationStack): def acceptsCards(self, from_stack, cards): diff --git a/pysollib/games/bakersdozen.py b/pysollib/games/bakersdozen.py index 60fd2be9..d8cf27cd 100644 --- a/pysollib/games/bakersdozen.py +++ b/pysollib/games/bakersdozen.py @@ -37,9 +37,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.hint import FreeCellSolverWrapper -# /*********************************************************************** -# // Castles in Spain -# ************************************************************************/ +# ************************************************************************ +# * Castles in Spain +# ************************************************************************ class CastlesInSpain(Game): Layout_Method = Layout.bakersDozenLayout @@ -78,9 +78,9 @@ class CastlesInSpain(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Martha -# ************************************************************************/ +# ************************************************************************ +# * Martha +# ************************************************************************ class Martha_RowStack(AC_RowStack): def acceptsCards(self, from_stack, cards): @@ -106,9 +106,9 @@ class Martha(CastlesInSpain): self.s.talon.dealRow(rows=self.s.foundations) -# /*********************************************************************** -# // Baker's Dozen -# ************************************************************************/ +# ************************************************************************ +# * Baker's Dozen +# ************************************************************************ class BakersDozen(CastlesInSpain): RowStack_Class = StackWrapper(RK_RowStack, max_move=1, max_accept=1, @@ -139,10 +139,10 @@ class BakersDozen(CastlesInSpain): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Spanish Patience -# // Portuguese Solitaire -# ************************************************************************/ +# ************************************************************************ +# * Spanish Patience +# * Portuguese Solitaire +# ************************************************************************ class SpanishPatience(BakersDozen): Foundation_Class = AC_FoundationStack @@ -161,9 +161,9 @@ class SpanishPatienceII(PortugueseSolitaire): Solver_Class = FreeCellSolverWrapper(sbb='rank') -# /*********************************************************************** -# // Good Measure -# ************************************************************************/ +# ************************************************************************ +# * Good Measure +# ************************************************************************ class GoodMeasure(BakersDozen): Solver_Class = FreeCellSolverWrapper(preset='good_measure') @@ -185,9 +185,9 @@ class GoodMeasure(BakersDozen): self.moveMove(1, self.s.talon, self.s.foundations[c.suit]) -# /*********************************************************************** -# // Cruel -# ************************************************************************/ +# ************************************************************************ +# * Cruel +# ************************************************************************ class Cruel_Talon(TalonStack): def canDealCards(self): @@ -258,10 +258,10 @@ class Cruel(CastlesInSpain): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Royal Family -# // Indefatigable -# ************************************************************************/ +# ************************************************************************ +# * Royal Family +# * Indefatigable +# ************************************************************************ class RoyalFamily(Cruel): Foundation_Class = StackWrapper(SS_FoundationStack, base_rank=KING, dir=-1) @@ -296,9 +296,9 @@ class Indefatigable(Cruel): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Perseverance -# ************************************************************************/ +# ************************************************************************ +# * Perseverance +# ************************************************************************ class Perseverance(Cruel, BakersDozen): Talon_Class = StackWrapper(Cruel_Talon, max_rounds=3) @@ -322,9 +322,9 @@ class Perseverance(Cruel, BakersDozen): ## Cruel.dealCards(self, sound) -# /*********************************************************************** -# // Ripple Fan -# ************************************************************************/ +# ************************************************************************ +# * Ripple Fan +# ************************************************************************ class RippleFan(CastlesInSpain): Solver_Class = None diff --git a/pysollib/games/bakersgame.py b/pysollib/games/bakersgame.py index 53d5f4ce..1e0bd372 100644 --- a/pysollib/games/bakersgame.py +++ b/pysollib/games/bakersgame.py @@ -37,9 +37,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.hint import FreeCellType_Hint, FreeCellSolverWrapper -# /*********************************************************************** -# // Baker's Game -# ************************************************************************/ +# ************************************************************************ +# * Baker's Game +# ************************************************************************ class BakersGame(Game): Layout_Method = Layout.freeCellLayout @@ -85,18 +85,18 @@ class BakersGame(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class KingOnlyBakersGame(BakersGame): RowStack_Class = StackWrapper(FreeCell_SS_RowStack, base_rank=KING) Solver_Class = FreeCellSolverWrapper(sbb='suit', esf='kings') -# /*********************************************************************** -# // Eight Off (Baker's Game in a different layout) -# ************************************************************************/ +# ************************************************************************ +# * Eight Off (Baker's Game in a different layout) +# ************************************************************************ class EightOff(KingOnlyBakersGame): @@ -146,9 +146,9 @@ class EightOff(KingOnlyBakersGame): self.s.talon.dealRow(rows=[r[0],r[2],r[4],r[6]]) -# /*********************************************************************** -# // Seahaven Towers (Baker's Game in a different layout) -# ************************************************************************/ +# ************************************************************************ +# * Seahaven Towers (Baker's Game in a different layout) +# ************************************************************************ class SeahavenTowers(KingOnlyBakersGame): @@ -197,20 +197,20 @@ class SeahavenTowers(KingOnlyBakersGame): self.s.talon.dealRow(rows=(self.s.reserves[1:3])) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class RelaxedSeahavenTowers(SeahavenTowers): RowStack_Class = KingSS_RowStack Solver_Class = FreeCellSolverWrapper(sbb='suit', esf='kings', sm='unlimited') -# /*********************************************************************** -# // Tuxedo -# // Penguin -# // Opus -# ************************************************************************/ +# ************************************************************************ +# * Tuxedo +# * Penguin +# * Opus +# ************************************************************************ class Tuxedo(Game): @@ -312,9 +312,9 @@ class Opus(Penguin): -# /*********************************************************************** -# // Flipper -# ************************************************************************/ +# ************************************************************************ +# * Flipper +# ************************************************************************ class Flipper_Row(AC_RowStack): def canFlipCard(self): diff --git a/pysollib/games/beleagueredcastle.py b/pysollib/games/beleagueredcastle.py index bfd2bb9a..7110517a 100644 --- a/pysollib/games/beleagueredcastle.py +++ b/pysollib/games/beleagueredcastle.py @@ -38,18 +38,18 @@ from pysollib.hint import FreeCellSolverWrapper from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class BeleagueredCastleType_Hint(CautiousDefaultHint): # FIXME: demo is not too clever in this game pass -# /*********************************************************************** -# // Streets and Alleys -# ************************************************************************/ +# ************************************************************************ +# * Streets and Alleys +# ************************************************************************ class StreetsAndAlleys(Game): Hint_Class = BeleagueredCastleType_Hint @@ -126,9 +126,9 @@ class StreetsAndAlleys(Game): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Beleaguered Castle -# ************************************************************************/ +# ************************************************************************ +# * Beleaguered Castle +# ************************************************************************ class BeleagueredCastle(StreetsAndAlleys): def _shuffleHook(self, cards): @@ -144,10 +144,10 @@ class BeleagueredCastle(StreetsAndAlleys): self.s.talon.dealRow(rows=self.s.foundations) -# /*********************************************************************** -# // Citadel -# // Exiled Kings -# ************************************************************************/ +# ************************************************************************ +# * Citadel +# * Exiled Kings +# ************************************************************************ class Citadel(StreetsAndAlleys): def _shuffleHook(self, cards): @@ -179,9 +179,9 @@ class ExiledKings(Citadel): RowStack_Class = StackWrapper(RK_RowStack, base_rank=KING) -# /*********************************************************************** -# // Fortress -# ************************************************************************/ +# ************************************************************************ +# * Fortress +# ************************************************************************ class Fortress(Game): Layout_Method = Layout.klondikeLayout @@ -227,11 +227,11 @@ class Fortress(Game): shallHighlightMatch = Game._shallHighlightMatch_SSW -# /*********************************************************************** -# // Bastion -# // Ten by One -# // Castles End -# ************************************************************************/ +# ************************************************************************ +# * Bastion +# * Ten by One +# * Castles End +# ************************************************************************ class Bastion(Game): Layout_Method = Layout.freeCellLayout @@ -370,9 +370,9 @@ class CastlesEnd(Bastion): shallHighlightMatch = Game._shallHighlightMatch_ACW -# /*********************************************************************** -# // Chessboard -# ************************************************************************/ +# ************************************************************************ +# * Chessboard +# ************************************************************************ class Chessboard_Foundation(SS_FoundationStack): def __init__(self, x, y, game, suit, **cap): @@ -420,10 +420,10 @@ class Chessboard(Fortress): self.texts.info.config(text=t) -# /*********************************************************************** -# // Stronghold -# // Fastness -# ************************************************************************/ +# ************************************************************************ +# * Stronghold +# * Fastness +# ************************************************************************ class Stronghold(StreetsAndAlleys): Hint_Class = FreeCellType_Hint @@ -438,9 +438,9 @@ class Fastness(StreetsAndAlleys): StreetsAndAlleys.createGame(self, reserves=2) -# /*********************************************************************** -# // Zerline -# ************************************************************************/ +# ************************************************************************ +# * Zerline +# ************************************************************************ class Zerline_ReserveStack(ReserveStack): def acceptsCards(self, from_stack, cards): @@ -525,9 +525,9 @@ class Zerline3Decks(Zerline): Zerline.createGame(self, rows=8, reserve_max_cards=6) -# /*********************************************************************** -# // Chequers -# ************************************************************************/ +# ************************************************************************ +# * Chequers +# ************************************************************************ class Chequers(Fortress): @@ -578,9 +578,9 @@ class Chequers(Fortress): self.s.talon.dealToStacks([stack]) -# /*********************************************************************** -# // Castle of Indolence -# ************************************************************************/ +# ************************************************************************ +# * Castle of Indolence +# ************************************************************************ class CastleOfIndolence(Game): Hint_Class = BeleagueredCastleType_Hint @@ -639,9 +639,9 @@ class CastleOfIndolence(Game): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Rittenhouse -# ************************************************************************/ +# ************************************************************************ +# * Rittenhouse +# ************************************************************************ class Rittenhouse_Foundation(RK_FoundationStack): def acceptsCards(self, from_stack, cards): @@ -716,10 +716,10 @@ class Rittenhouse(Game): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Lightweight -# // Castle Mount -# ************************************************************************/ +# ************************************************************************ +# * Lightweight +# * Castle Mount +# ************************************************************************ class Lightweight(StreetsAndAlleys): DEAL = (7, 1) @@ -770,9 +770,9 @@ class CastleMount(Lightweight): getQuickPlayScore = Game._getSpiderQuickPlayScore -# /*********************************************************************** -# // Selective Castle -# ************************************************************************/ +# ************************************************************************ +# * Selective Castle +# ************************************************************************ class SelectiveCastle_RowStack(RK_RowStack): def canDropCards(self, stacks): @@ -797,9 +797,9 @@ class SelectiveCastle(StreetsAndAlleys, Chessboard): shallHighlightMatch = Game._shallHighlightMatch_RKW -# /*********************************************************************** -# // Soother -# ************************************************************************/ +# ************************************************************************ +# * Soother +# ************************************************************************ class Soother(Game): Hint_Class = CautiousDefaultHint @@ -849,9 +849,9 @@ class Soother(Game): return int(to_stack in self.s.rows) -# /*********************************************************************** -# // Penelope's Web -# ************************************************************************/ +# ************************************************************************ +# * Penelope's Web +# ************************************************************************ class PenelopesWeb(StreetsAndAlleys): RowStack_Class = StackWrapper(RK_RowStack, base_rank=KING) diff --git a/pysollib/games/bisley.py b/pysollib/games/bisley.py index e8bf2f79..31ebc48a 100644 --- a/pysollib/games/bisley.py +++ b/pysollib/games/bisley.py @@ -37,9 +37,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // Bisley -# ************************************************************************/ +# ************************************************************************ +# * Bisley +# ************************************************************************ class Bisley(Game): @@ -96,9 +96,9 @@ class Bisley(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Double Bisley -# ************************************************************************/ +# ************************************************************************ +# * Double Bisley +# ************************************************************************ class DoubleBisley(Bisley): @@ -138,9 +138,9 @@ class DoubleBisley(Bisley): l.defaultAll() -# /*********************************************************************** -# // Gloria -# ************************************************************************/ +# ************************************************************************ +# * Gloria +# ************************************************************************ class Gloria(Game): @@ -191,10 +191,10 @@ class Gloria(Game): return self._shuffleHookMoveToBottom(cards, lambda c: (c.rank == KING, c.suit)) -# /*********************************************************************** -# // Realm -# // Mancunian -# ************************************************************************/ +# ************************************************************************ +# * Realm +# * Mancunian +# ************************************************************************ class Realm(Game): @@ -243,9 +243,9 @@ class Mancunian(Realm): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Hospital Patience -# ************************************************************************/ +# ************************************************************************ +# * Hospital Patience +# ************************************************************************ class HospitalPatience(Game): @@ -278,9 +278,9 @@ class HospitalPatience(Game): -# /*********************************************************************** -# // Board Patience -# ************************************************************************/ +# ************************************************************************ +# * Board Patience +# ************************************************************************ class BoardPatience(Game): Hint_Class = CautiousDefaultHint @@ -355,9 +355,9 @@ class BoardPatience(Game): p.dump(self.base_card.id) -# /*********************************************************************** -# // Cringle -# ************************************************************************/ +# ************************************************************************ +# * Cringle +# ************************************************************************ class Cringle(Game): diff --git a/pysollib/games/braid.py b/pysollib/games/braid.py index 61cbbed5..dad0d7c1 100644 --- a/pysollib/games/braid.py +++ b/pysollib/games/braid.py @@ -36,17 +36,17 @@ from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Braid_Hint(DefaultHint): # FIXME: demo is not too clever in this game pass -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Braid_Foundation(AbstractFoundationStack): def __init__(self, x, y, game, suit, **cap): @@ -103,9 +103,9 @@ class Braid_ReserveStack(ReserveStack): getBottomImage = Stack._getTalonBottomImage -# /*********************************************************************** -# // Braid -# ************************************************************************/ +# ************************************************************************ +# * Braid +# ************************************************************************ class Braid(Game): Hint_Class = Braid_Hint @@ -243,9 +243,9 @@ class LongBraid(Braid): BRAID_CARDS = 24 -# /*********************************************************************** -# // Fort -# ************************************************************************/ +# ************************************************************************ +# * Fort +# ************************************************************************ class Fort(Braid): @@ -276,9 +276,9 @@ class Fort(Braid): self.s.talon.dealCards() -# /*********************************************************************** -# // Backbone -# ************************************************************************/ +# ************************************************************************ +# * Backbone +# ************************************************************************ class Backbone_BraidStack(OpenStack): def __init__(self, x, y, game, **cap): @@ -352,17 +352,17 @@ class BackbonePlus(Backbone): Backbone.createGame(self, rows=10) -# /*********************************************************************** -# // Big Braid -# ************************************************************************/ +# ************************************************************************ +# * Big Braid +# ************************************************************************ class BigBraid(Braid): Foundation_Classes = [Braid_Foundation, Braid_Foundation, Braid_Foundation] -# /*********************************************************************** -# // Casket -# ************************************************************************/ +# ************************************************************************ +# * Casket +# ************************************************************************ class Casket_Hint(CautiousDefaultHint): def computeHints(self): @@ -497,9 +497,9 @@ class Casket(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Well -# ************************************************************************/ +# ************************************************************************ +# * Well +# ************************************************************************ class Well_TalonStack(DealRowRedealTalonStack): diff --git a/pysollib/games/bristol.py b/pysollib/games/bristol.py index d8bfcd26..303cb4dd 100644 --- a/pysollib/games/bristol.py +++ b/pysollib/games/bristol.py @@ -35,9 +35,9 @@ from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Bristol_Hint(CautiousDefaultHint): # FIXME: demo is not too clever in this game @@ -58,9 +58,9 @@ class Bristol_Hint(CautiousDefaultHint): return CautiousDefaultHint._getMovePileScore(self, score, color, r, t, pile, rpile) -# /*********************************************************************** -# // Bristol -# ************************************************************************/ +# ************************************************************************ +# * Bristol +# ************************************************************************ class Bristol_Talon(TalonStack): def dealCards(self, sound=False): @@ -141,9 +141,9 @@ class Bristol(Game): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Belvedere -# ************************************************************************/ +# ************************************************************************ +# * Belvedere +# ************************************************************************ class Belvedere(Bristol): def _shuffleHook(self, cards): @@ -168,9 +168,9 @@ class Belvedere(Bristol): self.s.talon.dealCards() # deal first cards to Reserves -# /*********************************************************************** -# // Dover -# ************************************************************************/ +# ************************************************************************ +# * Dover +# ************************************************************************ class Dover_RowStack(RK_RowStack): @@ -236,9 +236,9 @@ class Dover(Bristol): return cards -# /*********************************************************************** -# // New York -# ************************************************************************/ +# ************************************************************************ +# * New York +# ************************************************************************ class NewYork_Hint(CautiousDefaultHint): def computeHints(self): @@ -333,9 +333,9 @@ class NewYork(Dover): p.dump(self.base_card.id) -# /*********************************************************************** -# // Spike -# ************************************************************************/ +# ************************************************************************ +# * Spike +# ************************************************************************ class Spike(Dover): @@ -355,9 +355,9 @@ class Spike(Dover): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Gotham -# ************************************************************************/ +# ************************************************************************ +# * Gotham +# ************************************************************************ class Gotham_RowStack(RK_RowStack): def acceptsCards(self, from_stack, cards): @@ -378,9 +378,9 @@ class Gotham(NewYork): shallHighlightMatch = Game._shallHighlightMatch_RKW -# /*********************************************************************** -# // Interment -# ************************************************************************/ +# ************************************************************************ +# * Interment +# ************************************************************************ class Interment_Hint(CautiousDefaultHint): def computeHints(self): diff --git a/pysollib/games/buffalobill.py b/pysollib/games/buffalobill.py index 976244e5..00bd9052 100644 --- a/pysollib/games/buffalobill.py +++ b/pysollib/games/buffalobill.py @@ -35,10 +35,10 @@ from pysollib.game import Game from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // Buffalo Bill -# // Little Billie -# ************************************************************************/ +# ************************************************************************ +# * Buffalo Bill +# * Little Billie +# ************************************************************************ class BuffaloBill(Game): diff --git a/pysollib/games/calculation.py b/pysollib/games/calculation.py index 5ae7de89..a39c3b41 100644 --- a/pysollib/games/calculation.py +++ b/pysollib/games/calculation.py @@ -35,9 +35,9 @@ from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText, get_text_width -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Calculation_Hint(DefaultHint): # FIXME: demo logic is a complete nonsense @@ -55,9 +55,9 @@ class Calculation_Hint(DefaultHint): return score, color -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class BetsyRoss_Foundation(RK_FoundationStack): def updateText(self, update_empty=True): @@ -94,9 +94,9 @@ class Calculation_RowStack(BasicRowStack): return _('Tableau. Build regardless of rank and suit.') -# /*********************************************************************** -# // Calculation -# ************************************************************************/ +# ************************************************************************ +# * Calculation +# ************************************************************************ class Calculation(Game): Hint_Class = Calculation_Hint @@ -185,9 +185,9 @@ class Calculation(Game): return () -# /*********************************************************************** -# // Hopscotch -# ************************************************************************/ +# ************************************************************************ +# * Hopscotch +# ************************************************************************ class Hopscotch(Calculation): def _shuffleHook(self, cards): @@ -201,9 +201,9 @@ class Hopscotch(Calculation): return cards + topcards -# /*********************************************************************** -# // Betsy Ross -# ************************************************************************/ +# ************************************************************************ +# * Betsy Ross +# ************************************************************************ class BetsyRoss(Calculation): @@ -275,9 +275,9 @@ class BetsyRoss(Calculation): return cards + topcards -# /*********************************************************************** -# // One234 -# ************************************************************************/ +# ************************************************************************ +# * One234 +# ************************************************************************ class One234_Foundation(BetsyRoss_Foundation): def canMoveCards(self, cards): @@ -344,9 +344,9 @@ class One234(Calculation): self.s.talon.dealRow(rows=self.s.foundations) -# /*********************************************************************** -# // Senior Wrangler -# ************************************************************************/ +# ************************************************************************ +# * Senior Wrangler +# ************************************************************************ class SeniorWrangler_Talon(DealRowTalonStack): @@ -431,9 +431,9 @@ class SeniorWrangler(Game): self.s.talon.dealRow() -# /*********************************************************************** -# // S Patience -# ************************************************************************/ +# ************************************************************************ +# * S Patience +# ************************************************************************ class SPatience(Game): Hint_Class = Calculation_Hint diff --git a/pysollib/games/camelot.py b/pysollib/games/camelot.py index 5f75e270..851aab70 100644 --- a/pysollib/games/camelot.py +++ b/pysollib/games/camelot.py @@ -37,9 +37,9 @@ from pysollib.pysoltk import MfxCanvasText from numerica import Numerica_Hint -# /*********************************************************************** -# // Camelot -# ************************************************************************/ +# ************************************************************************ +# * Camelot +# ************************************************************************ class Camelot_Hint(AbstractHint): @@ -217,9 +217,9 @@ class Camelot(Game): return [self.is_fill] -# /*********************************************************************** -# // Sly Fox -# ************************************************************************/ +# ************************************************************************ +# * Sly Fox +# ************************************************************************ class SlyFox_Foundation(SS_FoundationStack): def acceptsCards(self, from_stack, cards): @@ -374,9 +374,9 @@ class OpenSlyFox(SlyFox): l.defaultStackGroups() -# /*********************************************************************** -# // Princess Patience -# ************************************************************************/ +# ************************************************************************ +# * Princess Patience +# ************************************************************************ class PrincessPatience_RowStack(SS_RowStack): @@ -460,9 +460,9 @@ class PrincessPatience(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Grandmamma's Patience -# ************************************************************************/ +# ************************************************************************ +# * Grandmamma's Patience +# ************************************************************************ class GrandmammasPatience_Talon(OpenTalonStack): rightclickHandler = OpenStack.rightclickHandler @@ -579,9 +579,9 @@ class GrandmammasPatience(Game): -# /*********************************************************************** -# // Double Line -# ************************************************************************/ +# ************************************************************************ +# * Double Line +# ************************************************************************ class DoubleLine_RowStack(BasicRowStack): def acceptsCards(self, from_stack, cards): diff --git a/pysollib/games/canfield.py b/pysollib/games/canfield.py index 5828f3b6..05352ccf 100644 --- a/pysollib/games/canfield.py +++ b/pysollib/games/canfield.py @@ -35,9 +35,9 @@ from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Canfield_Hint(CautiousDefaultHint): # FIXME: demo is not too clever in this game @@ -49,10 +49,10 @@ class Canfield_Hint(CautiousDefaultHint): return score + 100000, color -# /*********************************************************************** -# // a Canfield row stack only accepts a full other row stack -# // (cannot move part of a sequence from row to row) -# ************************************************************************/ +# ************************************************************************ +# * a Canfield row stack only accepts a full other row stack +# * (cannot move part of a sequence from row to row) +# ************************************************************************ class Canfield_AC_RowStack(AC_RowStack): def basicAcceptsCards(self, from_stack, cards): @@ -78,9 +78,9 @@ class Canfield_RK_RowStack(RK_RowStack): return RK_RowStack.basicAcceptsCards(self, from_stack, cards) -# /*********************************************************************** -# // Canfield -# ************************************************************************/ +# ************************************************************************ +# * Canfield +# ************************************************************************ class Canfield(Game): Talon_Class = WasteTalonStack @@ -228,27 +228,27 @@ class Canfield(Game): p.dump(self.base_card.id) -# /*********************************************************************** -# // Superior Canfield -# ************************************************************************/ +# ************************************************************************ +# * Superior Canfield +# ************************************************************************ class SuperiorCanfield(Canfield): INITIAL_RESERVE_FACEUP = 1 FILL_EMPTY_ROWS = 0 -# /*********************************************************************** -# // Rainfall -# ************************************************************************/ +# ************************************************************************ +# * Rainfall +# ************************************************************************ class Rainfall(Canfield): def createGame(self): Canfield.createGame(self, max_rounds=3, num_deal=1, round_text=True) -# /*********************************************************************** -# // Rainbow -# ************************************************************************/ +# ************************************************************************ +# * Rainbow +# ************************************************************************ class Rainbow(Canfield): RowStack_Class = StackWrapper(Canfield_RK_RowStack, mod=13) @@ -258,9 +258,9 @@ class Rainbow(Canfield): shallHighlightMatch = Game._shallHighlightMatch_RKW -# /*********************************************************************** -# // Storehouse (aka Straight Up) -# ************************************************************************/ +# ************************************************************************ +# * Storehouse (aka Straight Up) +# ************************************************************************ class Storehouse(Canfield): RowStack_Class = StackWrapper(Canfield_SS_RowStack, mod=13) @@ -283,9 +283,9 @@ class Storehouse(Canfield): pass -# /*********************************************************************** -# // Chameleon (aka Kansas) -# ************************************************************************/ +# ************************************************************************ +# * Chameleon (aka Kansas) +# ************************************************************************ class Chameleon(Canfield): RowStack_Class = StackWrapper(Canfield_RK_RowStack, mod=13) @@ -298,18 +298,18 @@ class Chameleon(Canfield): shallHighlightMatch = Game._shallHighlightMatch_RKW -# /*********************************************************************** -# // Double Canfield (Canfield with 2 decks and 5 rows) -# ************************************************************************/ +# ************************************************************************ +# * Double Canfield (Canfield with 2 decks and 5 rows) +# ************************************************************************ class DoubleCanfield(Canfield): def createGame(self): Canfield.createGame(self, rows=5) -# /*********************************************************************** -# // American Toad -# ************************************************************************/ +# ************************************************************************ +# * American Toad +# ************************************************************************ class AmericanToad(Canfield): RowStack_Class = StackWrapper(Canfield_SS_RowStack, mod=13) @@ -324,9 +324,9 @@ class AmericanToad(Canfield): shallHighlightMatch = Game._shallHighlightMatch_SSW -# /*********************************************************************** -# // Variegated Canfield -# ************************************************************************/ +# ************************************************************************ +# * Variegated Canfield +# ************************************************************************ class VariegatedCanfield(Canfield): RowStack_Class = Canfield_AC_RowStack @@ -352,9 +352,9 @@ class VariegatedCanfield(Canfield): pass -# /*********************************************************************** -# // Eagle Wing -# ************************************************************************/ +# ************************************************************************ +# * Eagle Wing +# ************************************************************************ class EagleWing_ReserveStack(OpenStack): def canFlipCard(self): @@ -407,11 +407,11 @@ class EagleWing(Canfield): shallHighlightMatch = Game._shallHighlightMatch_SSW -# /*********************************************************************** -# // Gate -# // Little Gate -# // Doorway -# ************************************************************************/ +# ************************************************************************ +# * Gate +# * Little Gate +# * Doorway +# ************************************************************************ class Gate(Game): @@ -552,11 +552,11 @@ class Doorway(LittleGate): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Minerva -# // Munger -# // Mystique -# ************************************************************************/ +# ************************************************************************ +# * Minerva +# * Munger +# * Mystique +# ************************************************************************ class Minerva(Canfield): RowStack_Class = KingAC_RowStack @@ -600,9 +600,9 @@ class Mystique(Munger): INITIAL_RESERVE_CARDS = 9 -# /*********************************************************************** -# // Triple Canfield -# ************************************************************************/ +# ************************************************************************ +# * Triple Canfield +# ************************************************************************ class TripleCanfield(Canfield): INITIAL_RESERVE_CARDS = 26 @@ -610,9 +610,9 @@ class TripleCanfield(Canfield): Canfield.createGame(self, rows=7) -# /*********************************************************************** -# // Acme -# ************************************************************************/ +# ************************************************************************ +# * Acme +# ************************************************************************ class Acme(Canfield): Foundation_Class = SS_FoundationStack @@ -647,9 +647,9 @@ class Acme(Canfield): pass -# /*********************************************************************** -# // Duke -# ************************************************************************/ +# ************************************************************************ +# * Duke +# ************************************************************************ class Duke(Game): Foundation_Class = SS_FoundationStack @@ -699,9 +699,9 @@ class Duke(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Demon -# ************************************************************************/ +# ************************************************************************ +# * Demon +# ************************************************************************ class Demon(Canfield): INITIAL_RESERVE_CARDS = 40 @@ -710,9 +710,9 @@ class Demon(Canfield): Canfield.createGame(self, rows=8, max_rounds=UNLIMITED_REDEALS, num_deal=3) -# /*********************************************************************** -# // Canfield Rush -# ************************************************************************/ +# ************************************************************************ +# * Canfield Rush +# ************************************************************************ class CanfieldRush_Talon(WasteTalonStack): def dealCards(self, sound=False): @@ -726,9 +726,9 @@ class CanfieldRush(Canfield): Canfield.createGame(self, max_rounds=3, round_text=True) -# /*********************************************************************** -# // Skippy -# ************************************************************************/ +# ************************************************************************ +# * Skippy +# ************************************************************************ class Skippy(Canfield): FILL_EMPTY_ROWS = 0 @@ -808,9 +808,9 @@ class Skippy(Canfield): shallHighlightMatch = Game._shallHighlightMatch_RKW -# /*********************************************************************** -# // Lafayette -# ************************************************************************/ +# ************************************************************************ +# * Lafayette +# ************************************************************************ class Lafayette(Game): def createGame(self): diff --git a/pysollib/games/capricieuse.py b/pysollib/games/capricieuse.py index 925327b2..b4ab5162 100644 --- a/pysollib/games/capricieuse.py +++ b/pysollib/games/capricieuse.py @@ -37,9 +37,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from gypsy import DieRussische_Foundation -# /*********************************************************************** -# // Capricieuse -# ************************************************************************/ +# ************************************************************************ +# * Capricieuse +# ************************************************************************ class Capricieuse(Game): Hint_Class = CautiousDefaultHint @@ -101,9 +101,9 @@ class Capricieuse(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Nationale -# ************************************************************************/ +# ************************************************************************ +# * Nationale +# ************************************************************************ class Nationale(Capricieuse): Talon_Class = InitialDealTalonStack @@ -115,9 +115,9 @@ class Nationale(Capricieuse): shallHighlightMatch = Game._shallHighlightMatch_SSW -# /*********************************************************************** -# // Strata -# ************************************************************************/ +# ************************************************************************ +# * Strata +# ************************************************************************ class Strata(Game): Hint_Class = CautiousDefaultHint @@ -159,9 +159,9 @@ class Strata(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Fifteen -# ************************************************************************/ +# ************************************************************************ +# * Fifteen +# ************************************************************************ class Fifteen(Capricieuse): Talon_Class = InitialDealTalonStack @@ -179,9 +179,9 @@ class Fifteen(Capricieuse): return cards -# /*********************************************************************** -# // Choice -# ************************************************************************/ +# ************************************************************************ +# * Choice +# ************************************************************************ class Choice_Foundation(RK_FoundationStack): def acceptsCards(self, from_stack, cards): diff --git a/pysollib/games/curdsandwhey.py b/pysollib/games/curdsandwhey.py index df0a78e2..e9662ab4 100644 --- a/pysollib/games/curdsandwhey.py +++ b/pysollib/games/curdsandwhey.py @@ -37,11 +37,11 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // Curds and Whey -# // Miss Muffet -# // Nordic -# ************************************************************************/ +# ************************************************************************ +# * Curds and Whey +# * Miss Muffet +# * Nordic +# ************************************************************************ class CurdsAndWhey_RowStack(BasicRowStack): @@ -134,11 +134,11 @@ class Nordic(MissMuffet): max_move=UNLIMITED_MOVES, max_accept=UNLIMITED_ACCEPTS) -# /*********************************************************************** -# // Dumfries -# // Galloway -# // Robin -# ************************************************************************/ +# ************************************************************************ +# * Dumfries +# * Galloway +# * Robin +# ************************************************************************ class Dumfries_TalonStack(OpenTalonStack): rightclickHandler = OpenStack.rightclickHandler @@ -202,10 +202,10 @@ class Robin(Dumfries): -# /*********************************************************************** -# // Arachnida -# // Harvestman -# ************************************************************************/ +# ************************************************************************ +# * Arachnida +# * Harvestman +# ************************************************************************ class Arachnida_RowStack(BasicRowStack): @@ -284,10 +284,10 @@ class Harvestman(Arachnida): RowStack_Class = CurdsAndWhey_RowStack -# /*********************************************************************** -# // German Patience -# // Bavarian Patience -# ************************************************************************/ +# ************************************************************************ +# * German Patience +# * Bavarian Patience +# ************************************************************************ class GermanPatience(Game): Hint_Class = CautiousDefaultHint @@ -337,11 +337,11 @@ class BavarianPatience(GermanPatience): GermanPatience.createGame(self, rows=10) -# /*********************************************************************** -# // Trusty Twelve -# // Knotty Nines -# // Sweet Sixteen -# ************************************************************************/ +# ************************************************************************ +# * Trusty Twelve +# * Knotty Nines +# * Sweet Sixteen +# ************************************************************************ class TrustyTwelve_Hint(AbstractHint): def computeHints(self): @@ -416,9 +416,9 @@ class SweetSixteen(TrustyTwelve): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Glacier -# ************************************************************************/ +# ************************************************************************ +# * Glacier +# ************************************************************************ class Glacier(Game): @@ -452,10 +452,10 @@ class Glacier(Game): shallHighlightMatch = Game._shallHighlightMatch_RKW -# /*********************************************************************** -# // Eight Packs (ex. Four Packs) -# // Four Packs -# ************************************************************************/ +# ************************************************************************ +# * Eight Packs (ex. Four Packs) +# * Four Packs +# ************************************************************************ class EightPacks(Game): RowStack_Class = SS_RowStack diff --git a/pysollib/games/dieboesesieben.py b/pysollib/games/dieboesesieben.py index 65aa1250..62a2c6a2 100644 --- a/pysollib/games/dieboesesieben.py +++ b/pysollib/games/dieboesesieben.py @@ -36,9 +36,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from gypsy import DieKoenigsbergerin_Talon, DieRussische_Foundation -# /*********************************************************************** -# // Die böse Sieben -# ************************************************************************/ +# ************************************************************************ +# * Die böse Sieben +# ************************************************************************ class DieBoeseSieben_Talon(DieKoenigsbergerin_Talon): def canDealCards(self): diff --git a/pysollib/games/diplomat.py b/pysollib/games/diplomat.py index 748622e0..76f3692b 100644 --- a/pysollib/games/diplomat.py +++ b/pysollib/games/diplomat.py @@ -39,9 +39,9 @@ from fortythieves import FortyThieves_Hint from spider import Spider_Hint -# /*********************************************************************** -# // Diplomat -# ************************************************************************/ +# ************************************************************************ +# * Diplomat +# ************************************************************************ class Diplomat(Game): Foundation_Class = SS_FoundationStack @@ -109,18 +109,18 @@ class Diplomat(Game): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Lady Palk -# ************************************************************************/ +# ************************************************************************ +# * Lady Palk +# ************************************************************************ class LadyPalk(Diplomat): RowStack_Class = RK_RowStack -# /*********************************************************************** -# // Congress -# // Parliament -# ************************************************************************/ +# ************************************************************************ +# * Congress +# * Parliament +# ************************************************************************ class Congress(Diplomat): DEAL = (0, 1) @@ -188,18 +188,18 @@ class Wheatsheaf(Congress): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Rows of Four -# ************************************************************************/ +# ************************************************************************ +# * Rows of Four +# ************************************************************************ class RowsOfFour(Diplomat): def createGame(self): Diplomat.createGame(self, max_rounds=3) -# /*********************************************************************** -# // Dieppe -# ************************************************************************/ +# ************************************************************************ +# * Dieppe +# ************************************************************************ class Dieppe(Diplomat): RowStack_Class = RK_RowStack @@ -228,9 +228,9 @@ class Dieppe(Diplomat): talon.dealCards() -# /*********************************************************************** -# // Little Napoleon -# ************************************************************************/ +# ************************************************************************ +# * Little Napoleon +# ************************************************************************ class LittleNapoleon(Diplomat): RowStack_Class = Spider_SS_RowStack @@ -246,9 +246,9 @@ class LittleNapoleon(Diplomat): getQuickPlayScore = Game._getSpiderQuickPlayScore -# /*********************************************************************** -# // Twin Queens -# ************************************************************************/ +# ************************************************************************ +# * Twin Queens +# ************************************************************************ class TwinQueens(Congress): Foundation_Classes = [ diff --git a/pysollib/games/doublets.py b/pysollib/games/doublets.py index 3b8798df..4be193c5 100644 --- a/pysollib/games/doublets.py +++ b/pysollib/games/doublets.py @@ -35,9 +35,9 @@ from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // Doublets -# ************************************************************************/ +# ************************************************************************ +# * Doublets +# ************************************************************************ class Doublets_Foundation(AbstractFoundationStack): def acceptsCards(self, from_stack, cards): diff --git a/pysollib/games/eiffeltower.py b/pysollib/games/eiffeltower.py index 559b0424..1a04f750 100644 --- a/pysollib/games/eiffeltower.py +++ b/pysollib/games/eiffeltower.py @@ -34,9 +34,9 @@ from pysollib.game import Game from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // Eiffel Tower -# ************************************************************************/ +# ************************************************************************ +# * Eiffel Tower +# ************************************************************************ class EiffelTower_RowStack(OpenStack): def __init__(self, x, y, game): @@ -102,9 +102,9 @@ class EiffelTower(Game): return card1.rank + card2.rank == 12 -# /*********************************************************************** -# // Strict Eiffel Tower -# ************************************************************************/ +# ************************************************************************ +# * Strict Eiffel Tower +# ************************************************************************ class StrictEiffelTower(EiffelTower): Waste_Class = StackWrapper(WasteStack, max_cards=2) diff --git a/pysollib/games/fan.py b/pysollib/games/fan.py index 4eaa12b6..cc45c76f 100644 --- a/pysollib/games/fan.py +++ b/pysollib/games/fan.py @@ -37,18 +37,18 @@ from pysollib.hint import FreeCellSolverWrapper from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Fan_Hint(CautiousDefaultHint): # FIXME: demo is not too clever in this game pass -# /*********************************************************************** -# // Fan -# ************************************************************************/ +# ************************************************************************ +# * Fan +# ************************************************************************ class Fan(Game): Talon_Class = InitialDealTalonStack @@ -126,9 +126,9 @@ class FanGame(Fan): Solver_Class = FreeCellSolverWrapper(preset='fan') -# /*********************************************************************** -# // Scotch Patience -# ************************************************************************/ +# ************************************************************************ +# * Scotch Patience +# ************************************************************************ class ScotchPatience(Fan): Foundation_Classes = [AC_FoundationStack] @@ -138,10 +138,10 @@ class ScotchPatience(Fan): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Shamrocks -# // Shamrocks II -# ************************************************************************/ +# ************************************************************************ +# * Shamrocks +# * Shamrocks II +# ************************************************************************ class Shamrocks(Fan): RowStack_Class = StackWrapper(UD_RK_RowStack, base_rank=NO_RANK, max_cards=3) @@ -171,9 +171,9 @@ class ShamrocksII(Shamrocks): return cards -# /*********************************************************************** -# // La Belle Lucie (Midnight Oil) -# ************************************************************************/ +# ************************************************************************ +# * La Belle Lucie (Midnight Oil) +# ************************************************************************ class LaBelleLucie_Talon(TalonStack): def canDealCards(self): @@ -230,18 +230,18 @@ class LaBelleLucie(Fan): return Fan.createGame(self, texts=True) -# /*********************************************************************** -# // Super Flower Garden -# ************************************************************************/ +# ************************************************************************ +# * Super Flower Garden +# ************************************************************************ class SuperFlowerGarden(LaBelleLucie): RowStack_Class = StackWrapper(RK_RowStack, base_rank=NO_RANK) shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Three Shuffles and a Draw -# ************************************************************************/ +# ************************************************************************ +# * Three Shuffles and a Draw +# ************************************************************************ class ThreeShufflesAndADraw_RowStack(SS_RowStack): def moveMove(self, ncards, to_stack, frames=-1, shadow=-1): @@ -337,9 +337,9 @@ class ThreeShufflesAndADraw(LaBelleLucie): p.dump(self.draw_done) -# /*********************************************************************** -# // Trefoil -# ************************************************************************/ +# ************************************************************************ +# * Trefoil +# ************************************************************************ class Trefoil(LaBelleLucie): GAME_VERSION = 2 @@ -360,9 +360,9 @@ class Trefoil(LaBelleLucie): self.s.talon.dealRow(rows=self.s.foundations) -# /*********************************************************************** -# // Intelligence -# ************************************************************************/ +# ************************************************************************ +# * Intelligence +# ************************************************************************ class Intelligence_Talon(LaBelleLucie_Talon): # all Aces go to Foundations @@ -443,11 +443,11 @@ class IntelligencePlus(Intelligence): Intelligence.createGame(self, rows=(5,5,5,4)) -# /*********************************************************************** -# // House in the Wood -# // House on the Hill -# // (2 decks variants of Fan) -# ************************************************************************/ +# ************************************************************************ +# * House in the Wood +# * House on the Hill +# * (2 decks variants of Fan) +# ************************************************************************ class HouseInTheWood(Fan): Foundation_Classes = [SS_FoundationStack, SS_FoundationStack] @@ -468,9 +468,9 @@ class HouseOnTheHill(HouseInTheWood): StackWrapper(SS_FoundationStack, base_rank=KING, dir=-1)] -# /*********************************************************************** -# // Clover Leaf -# ************************************************************************/ +# ************************************************************************ +# * Clover Leaf +# ************************************************************************ class CloverLeaf_RowStack(UD_SS_RowStack): def acceptsCards(self, from_stack, cards): @@ -546,9 +546,9 @@ class CloverLeaf(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Free Fan -# ************************************************************************/ +# ************************************************************************ +# * Free Fan +# ************************************************************************ class FreeFan(Fan): RowStack_Class = FullStackWrapper(SuperMoveSS_RowStack, base_rank=KING) @@ -557,9 +557,9 @@ class FreeFan(Fan): Fan.createGame(self, reserves=2, playcards=8) -# /*********************************************************************** -# // Box Fan -# ************************************************************************/ +# ************************************************************************ +# * Box Fan +# ************************************************************************ class BoxFan(Fan): @@ -583,9 +583,9 @@ class BoxFan(Fan): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Troika -# ************************************************************************/ +# ************************************************************************ +# * Troika +# ************************************************************************ class Troika(Fan): @@ -629,9 +629,9 @@ class Quads(Troika): ## self.s.talon.dealRow(rows=self.s.rows[:-1]) -# /*********************************************************************** -# // Fascination Fan -# ************************************************************************/ +# ************************************************************************ +# * Fascination Fan +# ************************************************************************ class FascinationFan_Talon(RedealTalonStack): def dealCards(self, sound=False): @@ -662,9 +662,9 @@ class FascinationFan(Fan): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Crescent -# ************************************************************************/ +# ************************************************************************ +# * Crescent +# ************************************************************************ class Crescent_Talon(RedealTalonStack): @@ -743,9 +743,9 @@ class Crescent(Game): shallHighlightMatch = Game._shallHighlightMatch_SSW -# /*********************************************************************** -# // School -# ************************************************************************/ +# ************************************************************************ +# * School +# ************************************************************************ class School(Fan): @@ -771,9 +771,9 @@ class School(Fan): return card1.rank == card2.rank -# /*********************************************************************** -# // Forest Glade -# ************************************************************************/ +# ************************************************************************ +# * Forest Glade +# ************************************************************************ class ForestGlade_Talon(DealRowRedealTalonStack): diff --git a/pysollib/games/fortythieves.py b/pysollib/games/fortythieves.py index 00b04543..3d33b411 100644 --- a/pysollib/games/fortythieves.py +++ b/pysollib/games/fortythieves.py @@ -37,19 +37,19 @@ from pysollib.pysoltk import MfxCanvasText from gypsy import DieRussische_Foundation -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class FortyThieves_Hint(CautiousDefaultHint): # FIXME: demo is not too clever in this game pass -# /*********************************************************************** -# // Forty Thieves -# // rows build down by suit -# ************************************************************************/ +# ************************************************************************ +# * Forty Thieves +# * rows build down by suit +# ************************************************************************ class FortyThieves(Game): Foundation_Class = SS_FoundationStack @@ -142,21 +142,21 @@ class FortyThieves(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Busy Aces -# // Limited -# // Courtyard -# // Waning Moon -# // Lucas -# // Napoleon's Square -# // Carre Napoleon -# // Josephine -# // Marie Rose -# // Big Courtyard -# // San Juan Hill -# // Famous Fifty -# // rows build down by suit -# ************************************************************************/ +# ************************************************************************ +# * Busy Aces +# * Limited +# * Courtyard +# * Waning Moon +# * Lucas +# * Napoleon's Square +# * Carre Napoleon +# * Josephine +# * Marie Rose +# * Big Courtyard +# * San Juan Hill +# * Famous Fifty +# * rows build down by suit +# ************************************************************************ class BusyAces(FortyThieves): DEAL = (0, 1) @@ -261,9 +261,9 @@ class FamousFifty(FortyThieves): DEAL = (0, 5) -# /*********************************************************************** -# // Deuces -# ************************************************************************/ +# ************************************************************************ +# * Deuces +# ************************************************************************ class Deuces(FortyThieves): Foundation_Class = StackWrapper(SS_FoundationStack, mod=13, base_rank=1) @@ -283,10 +283,10 @@ class Deuces(FortyThieves): shallHighlightMatch = Game._shallHighlightMatch_SSW -# /*********************************************************************** -# // Corona -# // Quadrangle -# ************************************************************************/ +# ************************************************************************ +# * Corona +# * Quadrangle +# ************************************************************************ class Corona(FortyThieves): FOUNDATION_MAX_MOVE = 0 @@ -308,18 +308,18 @@ class Quadrangle(Corona): shallHighlightMatch = Game._shallHighlightMatch_SSW -# /*********************************************************************** -# // Forty and Eight -# ************************************************************************/ +# ************************************************************************ +# * Forty and Eight +# ************************************************************************ class FortyAndEight(FortyThieves): def createGame(self): FortyThieves.createGame(self, max_rounds=2, rows=8, XCARDS=72) -# /*********************************************************************** -# // Little Forty -# ************************************************************************/ +# ************************************************************************ +# * Little Forty +# ************************************************************************ class LittleForty(FortyThieves): RowStack_Class = Spider_SS_RowStack @@ -334,18 +334,18 @@ class LittleForty(FortyThieves): getQuickPlayScore = Game._getSpiderQuickPlayScore -# /*********************************************************************** -# // Streets -# // Maria -# // Number Ten -# // Rank and File -# // Emperor -# // Triple Line -# // Big Streets -# // Number Twelve -# // Roosevelt -# // rows build down by alternate color -# ************************************************************************/ +# ************************************************************************ +# * Streets +# * Maria +# * Number Ten +# * Rank and File +# * Emperor +# * Triple Line +# * Big Streets +# * Number Twelve +# * Roosevelt +# * rows build down by alternate color +# ************************************************************************ class Streets(FortyThieves): RowStack_Class = AC_RowStack @@ -400,11 +400,11 @@ class Roosevelt(Streets): Streets.createGame(self, rows=7) -# /*********************************************************************** -# // Red and Black -# // Zebra -# // rows build down by alternate color, foundations up by alternate color -# ************************************************************************/ +# ************************************************************************ +# * Red and Black +# * Zebra +# * rows build down by alternate color, foundations up by alternate color +# ************************************************************************ class RedAndBlack(Streets): Foundation_Class = AC_FoundationStack @@ -434,12 +434,12 @@ class Zebra(RedAndBlack): FortyThieves.createGame(self, max_rounds=2, rows=8, XOFFSET=0) -# /*********************************************************************** -# // Indian -# // Midshipman -# // Mumbai -# // rows build down by any suit but own -# ************************************************************************/ +# ************************************************************************ +# * Indian +# * Midshipman +# * Mumbai +# * rows build down by any suit but own +# ************************************************************************ class Indian(FortyThieves): RowStack_Class = BO_RowStack @@ -466,13 +466,13 @@ class Mumbai(Indian): FortyThieves.createGame(self, XCARDS=84, rows=13) -# /*********************************************************************** -# // Napoleon's Exile -# // Double Rail -# // Single Rail (1 deck) -# // Final Battle -# // rows build down by rank -# ************************************************************************/ +# ************************************************************************ +# * Napoleon's Exile +# * Double Rail +# * Single Rail (1 deck) +# * Final Battle +# * rows build down by rank +# ************************************************************************ class NapoleonsExile(FortyThieves): RowStack_Class = RK_RowStack @@ -501,9 +501,9 @@ class FinalBattle(DoubleRail): -# /*********************************************************************** -# // Octave -# ************************************************************************/ +# ************************************************************************ +# * Octave +# ************************************************************************ class Octave_Talon(WasteTalonStack): @@ -626,9 +626,9 @@ class Octave(Game): self.leaveState(old_state) -# /*********************************************************************** -# // Fortune's Favor -# ************************************************************************/ +# ************************************************************************ +# * Fortune's Favor +# ************************************************************************ class FortunesFavor(Game): @@ -686,9 +686,9 @@ class FortunesFavor(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Octagon -# ************************************************************************/ +# ************************************************************************ +# * Octagon +# ************************************************************************ class Octagon(Game): Hint_Class = CautiousDefaultHint @@ -752,9 +752,9 @@ class Octagon(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Squadron -# ************************************************************************/ +# ************************************************************************ +# * Squadron +# ************************************************************************ class Squadron(FortyThieves): @@ -794,9 +794,9 @@ class Squadron(FortyThieves): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Waterloo -# ************************************************************************/ +# ************************************************************************ +# * Waterloo +# ************************************************************************ class Waterloo(FortyThieves): @@ -823,10 +823,10 @@ class Waterloo(FortyThieves): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Junction -# // Crossroads -# ************************************************************************/ +# ************************************************************************ +# * Junction +# * Crossroads +# ************************************************************************ class Junction(Game): Foundation_Class = StackWrapper(DieRussische_Foundation, max_cards=8) @@ -882,9 +882,9 @@ class Crossroads(Junction): self.s.talon.dealCards() -# /*********************************************************************** -# // The Spark -# ************************************************************************/ +# ************************************************************************ +# * The Spark +# ************************************************************************ class TheSpark_Talon(TalonStack): @@ -961,9 +961,9 @@ class TheSpark(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Double Gold Mine -# ************************************************************************/ +# ************************************************************************ +# * Double Gold Mine +# ************************************************************************ class DoubleGoldMine_RowStack(AC_RowStack): getBottomImage = Stack._getReserveBottomImage @@ -982,14 +982,14 @@ class DoubleGoldMine(Streets): self.s.talon.dealCards() -# /*********************************************************************** -# // Interchange -# // Unlimited -# // Breakwater -# // Forty Nine -# // Alternation -# // Triple Interchange -# ************************************************************************/ +# ************************************************************************ +# * Interchange +# * Unlimited +# * Breakwater +# * Forty Nine +# * Alternation +# * Triple Interchange +# ************************************************************************ class Interchange(FortyThieves): @@ -1063,9 +1063,9 @@ class TripleInterchange(Interchange): self.s.talon.dealCards() -# /*********************************************************************** -# // Indian Patience -# ************************************************************************/ +# ************************************************************************ +# * Indian Patience +# ************************************************************************ class IndianPatience_RowStack(BO_RowStack): def acceptsCards(self, from_stack, cards): @@ -1098,9 +1098,9 @@ class IndianPatience(Indian): self.leaveState(old_state) -# /*********************************************************************** -# // Floradora -# ************************************************************************/ +# ************************************************************************ +# * Floradora +# ************************************************************************ class Floradora(Game): Hint_Class = CautiousDefaultHint @@ -1142,9 +1142,9 @@ class Floradora(Game): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Blind Patience -# ************************************************************************/ +# ************************************************************************ +# * Blind Patience +# ************************************************************************ class BlindPatience_Hint(DefaultHint): SCORE_FLIP = 80000 @@ -1218,9 +1218,9 @@ class BlindPatience(FortyThieves): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Foothold -# ************************************************************************/ +# ************************************************************************ +# * Foothold +# ************************************************************************ class Foothold(FortyThieves): RowStack_Class = UD_AC_RowStack diff --git a/pysollib/games/freecell.py b/pysollib/games/freecell.py index 59df3fcb..ce9791df 100644 --- a/pysollib/games/freecell.py +++ b/pysollib/games/freecell.py @@ -39,9 +39,9 @@ from pysollib.hint import FreeCellType_Hint, FreeCellSolverWrapper from spider import Spider_AC_Foundation -# /*********************************************************************** -# // FreeCell -# ************************************************************************/ +# ************************************************************************ +# * FreeCell +# ************************************************************************ class FreeCell(Game): Layout_Method = Layout.freeCellLayout @@ -90,18 +90,18 @@ class FreeCell(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Relaxed FreeCell -# ************************************************************************/ +# ************************************************************************ +# * Relaxed FreeCell +# ************************************************************************ class RelaxedFreeCell(FreeCell): RowStack_Class = AC_RowStack Solver_Class = FreeCellSolverWrapper(sm='unlimited') -# /*********************************************************************** -# // ForeCell -# ************************************************************************/ +# ************************************************************************ +# * ForeCell +# ************************************************************************ class ForeCell(FreeCell): RowStack_Class = StackWrapper(FreeCell_AC_RowStack, base_rank=KING) @@ -115,10 +115,10 @@ class ForeCell(FreeCell): self.s.talon.dealRow(rows=self.s.reserves) -# /*********************************************************************** -# // Challenge FreeCell -# // Super Challenge FreeCell -# ************************************************************************/ +# ************************************************************************ +# * Challenge FreeCell +# * Super Challenge FreeCell +# ************************************************************************ class ChallengeFreeCell(FreeCell): def _shuffleHook(self, cards): @@ -131,9 +131,9 @@ class SuperChallengeFreeCell(ChallengeFreeCell): Solver_Class = FreeCellSolverWrapper(esf='kings') -# /*********************************************************************** -# // Stalactites -# ************************************************************************/ +# ************************************************************************ +# * Stalactites +# ************************************************************************ class Stalactites(FreeCell): Foundation_Class = StackWrapper(RK_FoundationStack, suit=ANY_SUIT, mod=13, min_cards=1) @@ -156,9 +156,9 @@ class Stalactites(FreeCell): s.cap.base_rank = s.cards[0].rank -# /*********************************************************************** -# // Double Freecell -# ************************************************************************/ +# ************************************************************************ +# * Double Freecell +# ************************************************************************ class DoubleFreecell(FreeCell): Solver_Class = None @@ -210,9 +210,9 @@ class DoubleFreecell(FreeCell): self.s.talon.dealRow(rows=self.s.foundations) -# /*********************************************************************** -# // Triple Freecell -# ************************************************************************/ +# ************************************************************************ +# * Triple Freecell +# ************************************************************************ class TripleFreecell(FreeCell): Solver_Class = None @@ -288,9 +288,9 @@ class BigCell(TripleFreecell): self.s.talon.dealRow() -# /*********************************************************************** -# // Spidercells -# ************************************************************************/ +# ************************************************************************ +# * Spidercells +# ************************************************************************ class Spidercells_RowStack(SuperMoveAC_RowStack): def canMoveCards(self, cards): @@ -331,11 +331,11 @@ class Spidercells(FreeCell): l.defaultAll() -# /*********************************************************************** -# // Seven by Four -# // Seven by Five -# // Bath -# ************************************************************************/ +# ************************************************************************ +# * Seven by Four +# * Seven by Five +# * Bath +# ************************************************************************ class SevenByFour(FreeCell): def createGame(self): @@ -364,9 +364,9 @@ class Bath(FreeCell): self.s.talon.dealRow(rows=self.s.rows[7:]) -# /*********************************************************************** -# // Clink -# ************************************************************************/ +# ************************************************************************ +# * Clink +# ************************************************************************ class Clink(FreeCell): Solver_Class = None @@ -409,9 +409,9 @@ class Clink(FreeCell): lambda c: (c.rank == ACE and c.suit in (0, 2), (c.suit))) -# /*********************************************************************** -# // Repair -# ************************************************************************/ +# ************************************************************************ +# * Repair +# ************************************************************************ class Repair(FreeCell): Solver_Class = FreeCellSolverWrapper(sm='unlimited') @@ -428,10 +428,10 @@ class Repair(FreeCell): self.s.talon.dealRow(rows=self.s.reserves) -# /*********************************************************************** -# // Four Colours -# // German FreeCell -# ************************************************************************/ +# ************************************************************************ +# * Four Colours +# * German FreeCell +# ************************************************************************ class FourColours_RowStack(AC_RowStack): getBottomImage = Stack._getReserveBottomImage @@ -491,9 +491,9 @@ class GermanFreeCell(SevenByFour): suit += 1 -# /*********************************************************************** -# // Ocean Towers -# ************************************************************************/ +# ************************************************************************ +# * Ocean Towers +# ************************************************************************ class OceanTowers(TripleFreecell): Solver_Class = FreeCellSolverWrapper(esf='kings', sbb='suit') @@ -512,9 +512,9 @@ class OceanTowers(TripleFreecell): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // KingCell -# ************************************************************************/ +# ************************************************************************ +# * KingCell +# ************************************************************************ class KingCell(FreeCell): Solver_Class = FreeCellSolverWrapper(sbb='rank', esf='kings') @@ -523,9 +523,9 @@ class KingCell(FreeCell): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Headquarters -# ************************************************************************/ +# ************************************************************************ +# * Headquarters +# ************************************************************************ class Headquarters_Reserve(ReserveStack): @@ -573,9 +573,9 @@ class Headquarters(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Can Can -# ************************************************************************/ +# ************************************************************************ +# * Can Can +# ************************************************************************ class CanCan(FreeCell): Hint_Class = DefaultHint @@ -594,9 +594,9 @@ class CanCan(FreeCell): self.s.talon.dealRowAvail() -# /*********************************************************************** -# // Limpopo -# ************************************************************************/ +# ************************************************************************ +# * Limpopo +# ************************************************************************ class Limpopo(Game): diff --git a/pysollib/games/glenwood.py b/pysollib/games/glenwood.py index 4e320650..786978b1 100644 --- a/pysollib/games/glenwood.py +++ b/pysollib/games/glenwood.py @@ -37,9 +37,9 @@ from pysollib.pysoltk import MfxCanvasText from canfield import Canfield_Hint -# /*********************************************************************** -# // Glenwood -# ************************************************************************/ +# ************************************************************************ +# * Glenwood +# ************************************************************************ class Glenwood_Talon(WasteTalonStack): def canDealCards(self): @@ -182,9 +182,9 @@ class Glenwood(Game): return [self.base_rank] -# /*********************************************************************** -# // Double Fives -# ************************************************************************/ +# ************************************************************************ +# * Double Fives +# ************************************************************************ class DoubleFives_Talon(RedealTalonStack): diff --git a/pysollib/games/golf.py b/pysollib/games/golf.py index 14af14a4..4786dd8e 100644 --- a/pysollib/games/golf.py +++ b/pysollib/games/golf.py @@ -36,9 +36,9 @@ from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Golf_Hint(AbstractHint): # FIXME: this is very simple @@ -71,9 +71,9 @@ class Golf_Hint(AbstractHint): self.addHint(score, ncards, r, w, color) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Golf_Talon(WasteTalonStack): def canDealCards(self): @@ -109,9 +109,9 @@ class Golf_RowStack(BasicRowStack): return _('Tableau. No building.') -# /*********************************************************************** -# // Golf -# ************************************************************************/ +# ************************************************************************ +# * Golf +# ************************************************************************ class Golf(Game): Waste_Class = Golf_Waste @@ -183,9 +183,9 @@ class Golf(Game): return (self.sg.dropstacks, self.sg.dropstacks, ()) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class DeadKingGolf(Golf): def getStrictness(self): @@ -203,9 +203,9 @@ class RelaxedGolf(Golf): shallHighlightMatch = Game._shallHighlightMatch_RKW -# /*********************************************************************** -# // Elevator - Relaxed Golf in a Pyramid layout -# ************************************************************************/ +# ************************************************************************ +# * Elevator - Relaxed Golf in a Pyramid layout +# ************************************************************************ class Elevator_RowStack(Golf_RowStack): STEP = (1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6) @@ -273,9 +273,9 @@ class Escalator(Elevator): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Black Hole -# ************************************************************************/ +# ************************************************************************ +# * Black Hole +# ************************************************************************ class BlackHole_Foundation(AbstractFoundationStack): def acceptsCards(self, from_stack, cards): @@ -365,9 +365,9 @@ class BlackHole(Game): -# /*********************************************************************** -# // Four Leaf Clovers -# ************************************************************************/ +# ************************************************************************ +# * Four Leaf Clovers +# ************************************************************************ class FourLeafClovers_Foundation(AbstractFoundationStack): def acceptsCards(self, from_stack, cards): @@ -427,9 +427,9 @@ class FourLeafClovers(Game): shallHighlightMatch = Game._shallHighlightMatch_RKW -# /*********************************************************************** -# // All in a Row -# ************************************************************************/ +# ************************************************************************ +# * All in a Row +# ************************************************************************ class AllInARow(BlackHole): @@ -472,10 +472,10 @@ class AllInARow(BlackHole): self.s.talon.dealRow() -# /*********************************************************************** -# // Robert -# // Wasatch -# ************************************************************************/ +# ************************************************************************ +# * Robert +# * Wasatch +# ************************************************************************ class Robert(Game): @@ -516,9 +516,9 @@ class Wasatch(Robert): self.s.talon.dealCards() -# /*********************************************************************** -# // Diamond Mine -# ************************************************************************/ +# ************************************************************************ +# * Diamond Mine +# ************************************************************************ DIAMOND = 3 @@ -571,9 +571,9 @@ class DiamondMine(Game): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Dolphin -# ************************************************************************/ +# ************************************************************************ +# * Dolphin +# ************************************************************************ class Dolphin(Game): @@ -620,9 +620,9 @@ class DoubleDolphin(Dolphin): self.s.talon.dealRowAvail() -# /*********************************************************************** -# // Waterfall -# ************************************************************************/ +# ************************************************************************ +# * Waterfall +# ************************************************************************ class Waterfall_Foundation(AbstractFoundationStack): def acceptsCards(self, from_stack, cards): @@ -692,10 +692,10 @@ class Waterfall(Game): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Vague -# // Thirty Two Cards -# ************************************************************************/ +# ************************************************************************ +# * Vague +# * Thirty Two Cards +# ************************************************************************ class Vague_RowStack(BasicRowStack): clickHandler = BasicRowStack.doubleclickHandler @@ -768,9 +768,9 @@ class ThirtyTwoCards(Vague): self.s.talon.dealRow() -# /*********************************************************************** -# // Devil's Solitaire -# ************************************************************************/ +# ************************************************************************ +# * Devil's Solitaire +# ************************************************************************ class DevilsSolitaire_Foundation(RK_FoundationStack): def acceptsCards(self, from_stack, cards): @@ -870,9 +870,9 @@ class DevilsSolitaire(Game): f.texts.misc.config(text=t) -# /*********************************************************************** -# // Three Fir-trees -# ************************************************************************/ +# ************************************************************************ +# * Three Fir-trees +# ************************************************************************ class ThreeFirTrees_RowStack(Golf_RowStack): def __init__(self, x, y, game): @@ -946,10 +946,10 @@ class ThreeFirTrees(Golf, FirTree_GameMethods): self.s.talon.dealCards() -# /*********************************************************************** -# // Napoleon Takes Moscow -# // Napoleon Leaves Moscow -# ************************************************************************/ +# ************************************************************************ +# * Napoleon Takes Moscow +# * Napoleon Leaves Moscow +# ************************************************************************ class NapoleonTakesMoscow(Game, FirTree_GameMethods): RowStack_Class = StackWrapper(SS_RowStack, base_rank=KING, max_move=1) @@ -1010,10 +1010,10 @@ class NapoleonLeavesMoscow(NapoleonTakesMoscow): self.s.talon.dealCards() -# /*********************************************************************** -# // Flake -# // Flake (2 decks) -# ************************************************************************/ +# ************************************************************************ +# * Flake +# * Flake (2 decks) +# ************************************************************************ from pileon import FourByFour_Hint @@ -1066,9 +1066,9 @@ class Flake2Decks(Flake): self.s.talon.dealRow() -# /*********************************************************************** -# // Beacon -# ************************************************************************/ +# ************************************************************************ +# * Beacon +# ************************************************************************ class Beacon(Game): diff --git a/pysollib/games/grandduchess.py b/pysollib/games/grandduchess.py index c00c0852..9b983b55 100644 --- a/pysollib/games/grandduchess.py +++ b/pysollib/games/grandduchess.py @@ -37,9 +37,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // Grand Duchess -# ************************************************************************/ +# ************************************************************************ +# * Grand Duchess +# ************************************************************************ class GrandDuchess_Talon(RedealTalonStack): @@ -137,9 +137,9 @@ class GrandDuchess(Game): return ((), (), self.sg.dropstacks) -# /*********************************************************************** -# // Parisienne -# ************************************************************************/ +# ************************************************************************ +# * Parisienne +# ************************************************************************ class Parisienne(GrandDuchess): def _shuffleHook(self, cards): diff --git a/pysollib/games/grandfathersclock.py b/pysollib/games/grandfathersclock.py index 0229be9e..a3a113f1 100644 --- a/pysollib/games/grandfathersclock.py +++ b/pysollib/games/grandfathersclock.py @@ -34,9 +34,9 @@ from pysollib.game import Game from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class GrandfathersClock_Hint(CautiousDefaultHint): # FIXME: demo is not too clever in this game @@ -46,9 +46,9 @@ class GrandfathersClock_Hint(CautiousDefaultHint): return 92000, color -# /*********************************************************************** -# // Grandfather's Clock -# ************************************************************************/ +# ************************************************************************ +# * Grandfather's Clock +# ************************************************************************ class GrandfathersClock(Game): Hint_Class = GrandfathersClock_Hint @@ -127,9 +127,9 @@ class GrandfathersClock(Game): return ((), (), ()) -# /*********************************************************************** -# // Dial -# ************************************************************************/ +# ************************************************************************ +# * Dial +# ************************************************************************ class Dial(Game): @@ -174,9 +174,9 @@ class Dial(Game): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Hemispheres -# ************************************************************************/ +# ************************************************************************ +# * Hemispheres +# ************************************************************************ BLACK, RED = 0, 1 @@ -354,9 +354,9 @@ class Hemispheres(Game): return card1.color == card2.color and abs(card1.rank-card2.rank) == 1 -# /*********************************************************************** -# // Big Ben -# ************************************************************************/ +# ************************************************************************ +# * Big Ben +# ************************************************************************ class BigBen_Talon(DealRowTalonStack): @@ -471,9 +471,9 @@ class BigBen(Game): shallHighlightMatch = Game._shallHighlightMatch_SSW -# /*********************************************************************** -# // Clock -# ************************************************************************/ +# ************************************************************************ +# * Clock +# ************************************************************************ class Clock_RowStack(RK_RowStack): diff --git a/pysollib/games/gypsy.py b/pysollib/games/gypsy.py index 76d351c9..ec9a1707 100644 --- a/pysollib/games/gypsy.py +++ b/pysollib/games/gypsy.py @@ -40,9 +40,9 @@ from pysollib.pysoltk import MfxCanvasText from spider import Spider_SS_Foundation, Spider_RowStack, Spider_Hint -# /*********************************************************************** -# // Gypsy -# ************************************************************************/ +# ************************************************************************ +# * Gypsy +# ************************************************************************ class Gypsy(Game): Layout_Method = Layout.gypsyLayout @@ -77,9 +77,9 @@ class Gypsy(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Giant -# ************************************************************************/ +# ************************************************************************ +# * Giant +# ************************************************************************ class Giant_Foundation(SS_FoundationStack): def canMoveCards(self, cards): @@ -97,9 +97,9 @@ class Giant(Gypsy): self.s.talon.dealRow() -# /*********************************************************************** -# // Irmgard -# ************************************************************************/ +# ************************************************************************ +# * Irmgard +# ************************************************************************ class Irmgard_Talon(TalonStack): # A single click deals 9 (or 7) new cards to the RowStacks. @@ -131,9 +131,9 @@ class Irmgard(Gypsy): self.s.talon.dealRow() -# /*********************************************************************** -# // Die Königsbergerin -# ************************************************************************/ +# ************************************************************************ +# * Die Königsbergerin +# ************************************************************************ class DieKoenigsbergerin_Talon(DealRowTalonStack): # all Aces go to Foundations @@ -150,9 +150,9 @@ class DieKoenigsbergerin(Gypsy): self.s.talon.dealRow() -# /*********************************************************************** -# // Die Russische -# ************************************************************************/ +# ************************************************************************ +# * Die Russische +# ************************************************************************ class DieRussische_Foundation(AbstractFoundationStack): def acceptsCards(self, from_stack, cards): @@ -198,10 +198,10 @@ class DieRussische(Gypsy): self.s.talon.dealRow(rows=(self.s.foundations[c.suit*2],)) -# /*********************************************************************** -# // Miss Milligan -# // Imperial Guards -# ************************************************************************/ +# ************************************************************************ +# * Miss Milligan +# * Imperial Guards +# ************************************************************************ class MissMilligan_ReserveStack(AC_RowStack): def acceptsCards(self, from_stack, cards): @@ -260,9 +260,9 @@ class ImperialGuards(MissMilligan): RowStack_Class = AC_RowStack -# /*********************************************************************** -# // Nomad -# ************************************************************************/ +# ************************************************************************ +# * Nomad +# ************************************************************************ class Nomad(MissMilligan): Foundation_Class = SS_FoundationStack @@ -276,9 +276,9 @@ class Nomad(MissMilligan): self.s.talon.dealRow() -# /*********************************************************************** -# // Milligan Cell -# ************************************************************************/ +# ************************************************************************ +# * Milligan Cell +# ************************************************************************ class MilliganCell(MissMilligan): ReserveStack_Class = ReserveStack @@ -291,11 +291,11 @@ class MilliganCell(MissMilligan): self.s.talon.dealRow() -# /*********************************************************************** -# // Milligan Harp -# // Carlton -# // Steve -# ************************************************************************/ +# ************************************************************************ +# * Milligan Harp +# * Carlton +# * Steve +# ************************************************************************ class MilliganHarp(Gypsy): Foundation_Class = StackWrapper(SS_FoundationStack, max_move=0) @@ -320,12 +320,12 @@ class Steve(Carlton): getQuickPlayScore = Game._getSpiderQuickPlayScore -# /*********************************************************************** -# // Lexington Harp -# // Brunswick -# // Mississippi -# // Griffon -# ************************************************************************/ +# ************************************************************************ +# * Lexington Harp +# * Brunswick +# * Mississippi +# * Griffon +# ************************************************************************ class LexingtonHarp(MilliganHarp): GAME_VERSION = 2 @@ -350,10 +350,10 @@ class Griffon(Mississippi): Mississippi.startGame(self, flip=1) -# /*********************************************************************** -# // Blockade -# // Phantom Blockade -# ************************************************************************/ +# ************************************************************************ +# * Blockade +# * Phantom Blockade +# ************************************************************************ class Blockade(Gypsy): Layout_Method = Layout.klondikeLayout @@ -390,9 +390,9 @@ class PhantomBlockade(Gypsy): self.s.talon.dealRow() -# /*********************************************************************** -# // Cone -# ************************************************************************/ +# ************************************************************************ +# * Cone +# ************************************************************************ class Cone_Talon(DealRowTalonStack): def canDealCards(self): @@ -450,9 +450,9 @@ class Cone(Gypsy): shallHighlightMatch = Game._shallHighlightMatch_ACW -# /*********************************************************************** -# // Surprise -# ************************************************************************/ +# ************************************************************************ +# * Surprise +# ************************************************************************ class Surprise_ReserveStack(ReserveStack): def acceptsCards(self, from_stack, cards): @@ -497,9 +497,9 @@ class Surprise(Gypsy): self.s.talon.dealRow() -# /*********************************************************************** -# // Elba -# ************************************************************************/ +# ************************************************************************ +# * Elba +# ************************************************************************ class Elba(Gypsy): Layout_Method = Layout.klondikeLayout @@ -515,9 +515,9 @@ class Elba(Gypsy): self.s.talon.dealRow() -# /*********************************************************************** -# // Millie -# ************************************************************************/ +# ************************************************************************ +# * Millie +# ************************************************************************ class Millie(Gypsy): Layout_Method = Layout.klondikeLayout @@ -530,11 +530,11 @@ class Millie(Gypsy): self.s.talon.dealRow() -# /*********************************************************************** -# // Hypotenuse -# // Eternal Triangle -# // Right Triangle -# ************************************************************************/ +# ************************************************************************ +# * Hypotenuse +# * Eternal Triangle +# * Right Triangle +# ************************************************************************ class Hypotenuse(Gypsy): Layout_Method = Layout.klondikeLayout @@ -599,9 +599,9 @@ class RightTriangle(Hypotenuse): self.sg.reservestacks.append(self.s.talon) -# /*********************************************************************** -# // Trapdoor -# ************************************************************************/ +# ************************************************************************ +# * Trapdoor +# ************************************************************************ class Trapdoor_Talon(DealRowTalonStack): def dealCards(self, sound=False): @@ -668,9 +668,9 @@ class TrapdoorSpider(Trapdoor): getQuickPlayScore = Game._getSpiderQuickPlayScore -# /*********************************************************************** -# // Flamenco -# ************************************************************************/ +# ************************************************************************ +# * Flamenco +# ************************************************************************ class Flamenco(Gypsy): @@ -700,9 +700,9 @@ class Flamenco(Gypsy): self.s.talon.dealRow() -# /*********************************************************************** -# // Eclipse -# ************************************************************************/ +# ************************************************************************ +# * Eclipse +# ************************************************************************ class Eclipse(Gypsy): Layout_Method = Layout.klondikeLayout @@ -721,9 +721,9 @@ class Eclipse(Gypsy): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Brazilian Patience -# ************************************************************************/ +# ************************************************************************ +# * Brazilian Patience +# ************************************************************************ class BrazilianPatience(Gypsy): Layout_Method = Layout.klondikeLayout @@ -739,9 +739,9 @@ class BrazilianPatience(Gypsy): self.s.talon.dealRow() -# /*********************************************************************** -# // Leprechaun -# ************************************************************************/ +# ************************************************************************ +# * Leprechaun +# ************************************************************************ class Leprechaun_Reserve(OpenStack): def canFlipCard(self): @@ -796,10 +796,10 @@ class Leprechaun(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Locked Cards -# // Topsy-Turvy Queens -# ************************************************************************/ +# ************************************************************************ +# * Locked Cards +# * Topsy-Turvy Queens +# ************************************************************************ class LockedCards_Reserve(OpenStack): def canFlipCard(self): @@ -883,9 +883,9 @@ class TopsyTurvyQueens(LockedCards): shallHighlightMatch = Game._shallHighlightMatch_SSW -# /*********************************************************************** -# // Thirty -# ************************************************************************/ +# ************************************************************************ +# * Thirty +# ************************************************************************ class Thirty_RowStack(BasicRowStack): def acceptsCards(self, from_stack, cards): diff --git a/pysollib/games/harp.py b/pysollib/games/harp.py index 42a54f2f..dbefad5f 100644 --- a/pysollib/games/harp.py +++ b/pysollib/games/harp.py @@ -40,9 +40,9 @@ from pysollib.pysoltk import MfxCanvasText from spider import Spider_RowStack, Spider_SS_Foundation, Spider_Hint -# /*********************************************************************** -# // Double Klondike (Klondike with 2 decks and 9 rows) -# ************************************************************************/ +# ************************************************************************ +# * Double Klondike (Klondike with 2 decks and 9 rows) +# ************************************************************************ class DoubleKlondike(Game): Layout_Method = Layout.harpLayout @@ -84,19 +84,19 @@ class DoubleKlondike(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Double Klondike by Threes -# ************************************************************************/ +# ************************************************************************ +# * Double Klondike by Threes +# ************************************************************************ class DoubleKlondikeByThrees(DoubleKlondike): def createGame(self): DoubleKlondike.createGame(self, num_deal=3) -# /*********************************************************************** -# // Gargantua (Double Klondike with one redeal) -# // Pantagruel -# ************************************************************************/ +# ************************************************************************ +# * Gargantua (Double Klondike with one redeal) +# * Pantagruel +# ************************************************************************ class Gargantua(DoubleKlondike): def createGame(self): @@ -107,9 +107,9 @@ class Pantagruel(DoubleKlondike): def createGame(self): DoubleKlondike.createGame(self, max_rounds=1) -# /*********************************************************************** -# // Harp (Double Klondike with 10 non-king rows and no redeal) -# ************************************************************************/ +# ************************************************************************ +# * Harp (Double Klondike with 10 non-king rows and no redeal) +# ************************************************************************ class BigHarp(DoubleKlondike): RowStack_Class = AC_RowStack @@ -131,9 +131,9 @@ class BigHarp(DoubleKlondike): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Steps (Harp with 7 rows) -# ************************************************************************/ +# ************************************************************************ +# * Steps (Harp with 7 rows) +# ************************************************************************ class Steps(DoubleKlondike): RowStack_Class = AC_RowStack @@ -142,11 +142,11 @@ class Steps(DoubleKlondike): DoubleKlondike.createGame(self, max_rounds=2, rows=7) -# /*********************************************************************** -# // Triple Klondike -# // Triple Klondike by Threes -# // Chinese Klondike -# ************************************************************************/ +# ************************************************************************ +# * Triple Klondike +# * Triple Klondike by Threes +# * Chinese Klondike +# ************************************************************************ class TripleKlondike(DoubleKlondike): def createGame(self): @@ -164,10 +164,10 @@ class ChineseKlondike(DoubleKlondike): DoubleKlondike.createGame(self, rows=12) -# /*********************************************************************** -# // Lady Jane -# // Inquisitor -# ************************************************************************/ +# ************************************************************************ +# * Lady Jane +# * Inquisitor +# ************************************************************************ class LadyJane(DoubleKlondike): Hint_Class = Spider_Hint @@ -192,9 +192,9 @@ class Inquisitor(DoubleKlondike): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Arabella -# ************************************************************************/ +# ************************************************************************ +# * Arabella +# ************************************************************************ class Arabella(DoubleKlondike): Hint_Class = Spider_Hint @@ -209,9 +209,9 @@ class Arabella(DoubleKlondike): getQuickPlayScore = Game._getSpiderQuickPlayScore -# /*********************************************************************** -# // Big Deal -# ************************************************************************/ +# ************************************************************************ +# * Big Deal +# ************************************************************************ class BigDeal(DoubleKlondike): RowStack_Class = KingAC_RowStack @@ -243,9 +243,9 @@ class BigDeal(DoubleKlondike): l.defaultStackGroups() -# /*********************************************************************** -# // Delivery -# ************************************************************************/ +# ************************************************************************ +# * Delivery +# ************************************************************************ class Delivery(BigDeal): Hint_Class = CautiousDefaultHint @@ -265,9 +265,9 @@ class Delivery(BigDeal): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Double Kingsley -# ************************************************************************/ +# ************************************************************************ +# * Double Kingsley +# ************************************************************************ class DoubleKingsley(DoubleKlondike): Foundation_Class = StackWrapper(SS_FoundationStack, base_rank=KING, dir=-1) @@ -277,9 +277,9 @@ class DoubleKingsley(DoubleKlondike): DoubleKlondike.createGame(self, max_rounds=1) -# /*********************************************************************** -# // Thieves of Egypt -# ************************************************************************/ +# ************************************************************************ +# * Thieves of Egypt +# ************************************************************************ class ThievesOfEgypt(DoubleKlondike): Layout_Method = Layout.klondikeLayout @@ -299,9 +299,9 @@ class ThievesOfEgypt(DoubleKlondike): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Brush -# ************************************************************************/ +# ************************************************************************ +# * Brush +# ************************************************************************ class Brush(DoubleKlondike): Layout_Method = Layout.klondikeLayout diff --git a/pysollib/games/headsandtails.py b/pysollib/games/headsandtails.py index 10d321ef..7af7271a 100644 --- a/pysollib/games/headsandtails.py +++ b/pysollib/games/headsandtails.py @@ -36,9 +36,9 @@ from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // Heads and Tails -# ************************************************************************/ +# ************************************************************************ +# * Heads and Tails +# ************************************************************************ class HeadsAndTails_Reserve(OpenStack): def canFlipCard(self): @@ -133,9 +133,9 @@ class HeadsAndTails(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Barrier -# ************************************************************************/ +# ************************************************************************ +# * Barrier +# ************************************************************************ class Barrier_ReserveStack(OpenStack): diff --git a/pysollib/games/katzenschwanz.py b/pysollib/games/katzenschwanz.py index ae8e8231..945b466d 100644 --- a/pysollib/games/katzenschwanz.py +++ b/pysollib/games/katzenschwanz.py @@ -37,9 +37,9 @@ from pysollib.hint import FreeCellSolverWrapper from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class DerKatzenschwanz_Hint(FreeCellType_Hint): def _getMovePileScore(self, score, color, r, t, pile, rpile): @@ -49,9 +49,9 @@ class DerKatzenschwanz_Hint(FreeCellType_Hint): return FreeCellType_Hint._getMovePileScore(self, score, color, r, t, pile, rpile) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class DerKatzenschwanz(Game): RowStack_Class = StackWrapper(AC_RowStack, base_rank=NO_RANK) @@ -132,9 +132,9 @@ class DerKatzenschwanz(Game): return closest -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class DieSchlange(DerKatzenschwanz): @@ -160,9 +160,9 @@ class DieSchlange(DerKatzenschwanz): self.s.talon.dealRow(rows=(to_stack,), frames=4) -# /*********************************************************************** -# // Kings -# ************************************************************************/ +# ************************************************************************ +# * Kings +# ************************************************************************ class Kings(DerKatzenschwanz): @@ -181,9 +181,9 @@ class Kings(DerKatzenschwanz): return cards -# /*********************************************************************** -# // Retinue -# ************************************************************************/ +# ************************************************************************ +# * Retinue +# ************************************************************************ class Retinue(DieSchlange, Kings): @@ -198,9 +198,9 @@ class Retinue(DieSchlange, Kings): return DieSchlange.startGame(self) -# /*********************************************************************** -# // Salic Law -# ************************************************************************/ +# ************************************************************************ +# * Salic Law +# ************************************************************************ class SalicLaw_Hint(CautiousDefaultHint): @@ -353,9 +353,9 @@ class SalicLaw(DerKatzenschwanz): return True -# /*********************************************************************** -# // Deep -# ************************************************************************/ +# ************************************************************************ +# * Deep +# ************************************************************************ class Deep(DerKatzenschwanz): RowStack_Class = StackWrapper(AC_RowStack, base_rank=ANY_RANK) @@ -371,9 +371,9 @@ class Deep(DerKatzenschwanz): self.s.talon.dealRow() -# /*********************************************************************** -# // Faerie Queen -# ************************************************************************/ +# ************************************************************************ +# * Faerie Queen +# ************************************************************************ class FaerieQueen_RowStack(RK_RowStack): def acceptsCards(self, from_stack, cards): @@ -418,11 +418,11 @@ class FaerieQueen(SalicLaw): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Intrigue -# // Laggard Lady -# // Glencoe -# ************************************************************************/ +# ************************************************************************ +# * Intrigue +# * Laggard Lady +# * Glencoe +# ************************************************************************ class Intrigue_RowStack(OpenStack): def acceptsCards(self, from_stack, cards): @@ -502,9 +502,9 @@ class Glencoe(Intrigue): ] -# /*********************************************************************** -# // Step-Up -# ************************************************************************/ +# ************************************************************************ +# * Step-Up +# ************************************************************************ class StepUp_Foundation(SS_FoundationStack): def acceptsCards(self, from_stack, cards): @@ -610,9 +610,9 @@ class StepUp(Game): shallHighlightMatch = Game._shallHighlightMatch_ACW -# /*********************************************************************** -# // Kentish -# ************************************************************************/ +# ************************************************************************ +# * Kentish +# ************************************************************************ class Kentish(Kings): Solver_Class = FreeCellSolverWrapper(sbb='rank', sm='unlimited') diff --git a/pysollib/games/klondike.py b/pysollib/games/klondike.py index 605d2959..c03ad98a 100644 --- a/pysollib/games/klondike.py +++ b/pysollib/games/klondike.py @@ -41,9 +41,9 @@ from pysollib.pysoltk import MfxCanvasText from canfield import CanfieldRush_Talon -# /*********************************************************************** -# // Klondike -# ************************************************************************/ +# ************************************************************************ +# * Klondike +# ************************************************************************ class Klondike(Game): Layout_Method = Layout.klondikeLayout @@ -82,9 +82,9 @@ class Klondike(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Vegas Klondike -# ************************************************************************/ +# ************************************************************************ +# * Vegas Klondike +# ************************************************************************ class VegasKlondike(Klondike): getGameScore = Game.getGameScoreCasino @@ -110,9 +110,9 @@ class VegasKlondike(Klondike): return tinfo[1] # "se" corner -# /*********************************************************************** -# // Casino Klondike -# ************************************************************************/ +# ************************************************************************ +# * Casino Klondike +# ************************************************************************ class CasinoKlondike(VegasKlondike): def createGame(self): @@ -120,19 +120,19 @@ class CasinoKlondike(VegasKlondike): l.createRoundText(self.s.talon, 'ne', dx=l.XS) -# /*********************************************************************** -# // Klondike by Threes -# ************************************************************************/ +# ************************************************************************ +# * Klondike by Threes +# ************************************************************************ class KlondikeByThrees(Klondike): def createGame(self): Klondike.createGame(self, num_deal=3) -# /*********************************************************************** -# // Thumb and Pouch -# // Chinaman -# ************************************************************************/ +# ************************************************************************ +# * Thumb and Pouch +# * Chinaman +# ************************************************************************ class ThumbAndPouch(Klondike): RowStack_Class = BO_RowStack @@ -155,9 +155,9 @@ class Chinaman(ThumbAndPouch): l.createRoundText(self.s.talon, 'ne', dx=l.XS) -# /*********************************************************************** -# // Whitehead -# ************************************************************************/ +# ************************************************************************ +# * Whitehead +# ************************************************************************ class Whitehead_RowStack(SS_RowStack): def _isAcceptableSequence(self, cards): @@ -179,9 +179,9 @@ class Whitehead(Klondike): getQuickPlayScore = Game._getSpiderQuickPlayScore -# /*********************************************************************** -# // Small Harp (Klondike in a different layout) -# ************************************************************************/ +# ************************************************************************ +# * Small Harp (Klondike in a different layout) +# ************************************************************************ class SmallHarp(Klondike): Layout_Method = Layout.gypsyLayout @@ -194,10 +194,10 @@ class SmallHarp(Klondike): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Eastcliff -# // Easthaven -# ************************************************************************/ +# ************************************************************************ +# * Eastcliff +# * Easthaven +# ************************************************************************ class Eastcliff(Klondike): RowStack_Class = AC_RowStack @@ -228,10 +228,10 @@ class TripleEasthaven(Easthaven): Klondike.createGame(self, rows=12, max_rounds=1, waste=0, playcards=26) -# /*********************************************************************** -# // Westcliff -# // Westhaven -# ************************************************************************/ +# ************************************************************************ +# * Westcliff +# * Westhaven +# ************************************************************************ class Westcliff(Eastcliff): Foundation_Class = StackWrapper(SS_FoundationStack, max_move=0) @@ -247,9 +247,9 @@ class Westhaven(Westcliff): Klondike.createGame(self, max_rounds=1, rows=10, waste=0) -# /*********************************************************************** -# // Pas Seul -# ************************************************************************/ +# ************************************************************************ +# * Pas Seul +# ************************************************************************ class PasSeul(Eastcliff): def createGame(self): @@ -261,9 +261,9 @@ class PasSeul(Eastcliff): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Blind Alleys -# ************************************************************************/ +# ************************************************************************ +# * Blind Alleys +# ************************************************************************ class BlindAlleys(Eastcliff): def createGame(self): @@ -279,11 +279,11 @@ class BlindAlleys(Eastcliff): Eastcliff.startGame(self) -# /*********************************************************************** -# // Somerset -# // Morehead -# // Usk -# ************************************************************************/ +# ************************************************************************ +# * Somerset +# * Morehead +# * Usk +# ************************************************************************ class Somerset(Klondike): Talon_Class = InitialDealTalonStack @@ -324,11 +324,11 @@ class Usk(Somerset): self.s.talon.dealRowAvail(rows=self.s.rows[n:], frames=4) n += 1 -# /*********************************************************************** -# // Canister -# // American Canister -# // British Canister -# ************************************************************************/ +# ************************************************************************ +# * Canister +# * American Canister +# * British Canister +# ************************************************************************ class AmericanCanister(Klondike): Talon_Class = InitialDealTalonStack @@ -357,9 +357,9 @@ class BritishCanister(AmericanCanister): Solver_Class = FreeCellSolverWrapper(esf='kings') -# /*********************************************************************** -# // Agnes Sorel -# ************************************************************************/ +# ************************************************************************ +# * Agnes Sorel +# ************************************************************************ class AgnesSorel(Klondike): Talon_Class = DealRowTalonStack @@ -379,11 +379,11 @@ class AgnesSorel(Klondike): (card2.rank + 1) % 13 == card1.rank)) -# /*********************************************************************** -# // 8 x 8 -# // Achtmal Acht -# // Eight by Eight -# ************************************************************************/ +# ************************************************************************ +# * 8 x 8 +# * Achtmal Acht +# * Eight by Eight +# ************************************************************************ class EightTimesEight(Klondike): Layout_Method = Layout.gypsyLayout @@ -427,10 +427,10 @@ class EightByEight(EightTimesEight): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Batsford -# // Batsford Again -# ************************************************************************/ +# ************************************************************************ +# * Batsford +# * Batsford Again +# ************************************************************************ class Batsford_ReserveStack(ReserveStack): def acceptsCards(self, from_stack, cards): @@ -462,9 +462,9 @@ class BatsfordAgain(Batsford): Batsford.createGame(self, max_rounds=2) -# /*********************************************************************** -# // Jumbo -# ************************************************************************/ +# ************************************************************************ +# * Jumbo +# ************************************************************************ class Jumbo(Klondike): def createGame(self): @@ -483,10 +483,10 @@ class OpenJumbo(Jumbo): Jumbo.startGame(self, flip=1) -# /*********************************************************************** -# // Stonewall -# // Flower Garden -# ************************************************************************/ +# ************************************************************************ +# * Stonewall +# * Flower Garden +# ************************************************************************ class Stonewall(Klondike): Talon_Class = InitialDealTalonStack @@ -525,12 +525,12 @@ class FlowerGarden(Stonewall): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // King Albert -# // Raglan -# // Brigade -# // Queen Victoria -# ************************************************************************/ +# ************************************************************************ +# * King Albert +# * Raglan +# * Brigade +# * Queen Victoria +# ************************************************************************ class KingAlbert(Klondike): Talon_Class = InitialDealTalonStack @@ -594,10 +594,10 @@ class QueenVictoria(KingAlbert): RowStack_Class = AC_RowStack -# /*********************************************************************** -# // Jane -# // Agnes Bernauer -# ************************************************************************/ +# ************************************************************************ +# * Jane +# * Agnes Bernauer +# ************************************************************************ class Jane_Talon(OpenTalonStack): rightclickHandler = OpenStack.rightclickHandler @@ -694,9 +694,9 @@ class AgnesBernauer(Jane): Jane.startGame(self, flip=1) -# /*********************************************************************** -# // Senate -# ************************************************************************/ +# ************************************************************************ +# * Senate +# ************************************************************************ class Senate(Jane): @@ -750,10 +750,10 @@ class SenatePlus(Senate): def createGame(self): Senate.createGame(self, rows=5) -# /*********************************************************************** -# // Phoenix -# // Arizona -# ************************************************************************/ +# ************************************************************************ +# * Phoenix +# * Arizona +# ************************************************************************ class Phoenix(Klondike): @@ -796,9 +796,9 @@ class Arizona(Phoenix): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Lanes -# ************************************************************************/ +# ************************************************************************ +# * Lanes +# ************************************************************************ class Lanes(Klondike): @@ -824,9 +824,9 @@ class Lanes(Klondike): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Thirty Six -# ************************************************************************/ +# ************************************************************************ +# * Thirty Six +# ************************************************************************ class ThirtySix(Klondike): @@ -858,9 +858,9 @@ class ThirtySix(Klondike): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Q.C. -# ************************************************************************/ +# ************************************************************************ +# * Q.C. +# ************************************************************************ class Q_C_(Klondike): @@ -910,10 +910,10 @@ class Q_C_(Klondike): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Northwest Territory -# // Artic Garden -# ************************************************************************/ +# ************************************************************************ +# * Northwest Territory +# * Artic Garden +# ************************************************************************ class NorthwestTerritory(KingAlbert): RowStack_Class = StackWrapper(AC_RowStack, base_rank=KING) @@ -930,9 +930,9 @@ class ArticGarden(NorthwestTerritory): self.s.talon.dealRow(rows=self.s.reserves) -# /*********************************************************************** -# // Aunt Mary -# ************************************************************************/ +# ************************************************************************ +# * Aunt Mary +# ************************************************************************ class AuntMary(Klondike): def createGame(self): @@ -947,9 +947,9 @@ class AuntMary(Klondike): self.s.talon.dealCards() -# /*********************************************************************** -# // Double Dot -# ************************************************************************/ +# ************************************************************************ +# * Double Dot +# ************************************************************************ class DoubleDot(Klondike): Talon_Class = DealRowTalonStack @@ -975,9 +975,9 @@ class DoubleDot(Klondike): shallHighlightMatch = Game._shallHighlightMatch_RKW -# /*********************************************************************** -# // Seven Devils -# ************************************************************************/ +# ************************************************************************ +# * Seven Devils +# ************************************************************************ class SevenDevils_RowStack(AC_RowStack): def acceptsCards(self, from_stack, cards): @@ -1024,10 +1024,10 @@ class SevenDevils(Klondike): self.s.talon.dealRow(rows=self.s.reserves) -# /*********************************************************************** -# // Moving Left -# // Souter -# ************************************************************************/ +# ************************************************************************ +# * Moving Left +# * Souter +# ************************************************************************ class MovingLeft(Klondike): @@ -1054,11 +1054,11 @@ class Souter(MovingLeft): l.createRoundText(self.s.talon, 'ne', dx=l.XS) -# /*********************************************************************** -# // Big Forty -# // Ali Baba -# // Cassim -# ************************************************************************/ +# ************************************************************************ +# * Big Forty +# * Ali Baba +# * Cassim +# ************************************************************************ class BigForty(Klondike): RowStack_Class = SS_RowStack @@ -1092,9 +1092,9 @@ class Cassim(AliBaba): Klondike.createGame(self, rows=7) -# /*********************************************************************** -# // Saratoga -# ************************************************************************/ +# ************************************************************************ +# * Saratoga +# ************************************************************************ class Saratoga(Klondike): def createGame(self): @@ -1103,9 +1103,9 @@ class Saratoga(Klondike): Klondike.startGame(self, flip=1) -# /*********************************************************************** -# // Whitehorse -# ************************************************************************/ +# ************************************************************************ +# * Whitehorse +# ************************************************************************ class Whitehorse(Klondike): @@ -1128,9 +1128,9 @@ class Whitehorse(Klondike): self.leaveState(old_state) -# /*********************************************************************** -# // Boost -# ************************************************************************/ +# ************************************************************************ +# * Boost +# ************************************************************************ class Boost(Klondike): def createGame(self): @@ -1138,9 +1138,9 @@ class Boost(Klondike): l.createRoundText(self.s.talon, 'ne', dx=l.XS) -# /*********************************************************************** -# // Gold Rush -# ************************************************************************/ +# ************************************************************************ +# * Gold Rush +# ************************************************************************ class GoldRush(Klondike): Talon_Class = CanfieldRush_Talon @@ -1149,9 +1149,9 @@ class GoldRush(Klondike): l.createRoundText(self.s.talon, 'ne', dx=l.XS) -# /*********************************************************************** -# // Gold Mine -# ************************************************************************/ +# ************************************************************************ +# * Gold Mine +# ************************************************************************ class GoldMine_RowStack(AC_RowStack): getBottomImage = Stack._getReserveBottomImage @@ -1168,10 +1168,10 @@ class GoldMine(Klondike): self.s.talon.dealCards() -# /*********************************************************************** -# // Lucky Thirteen -# // Lucky Piles -# ************************************************************************/ +# ************************************************************************ +# * Lucky Thirteen +# * Lucky Piles +# ************************************************************************ class LuckyThirteen(Game): Hint_Class = CautiousDefaultHint @@ -1233,9 +1233,9 @@ class LuckyPiles(LuckyThirteen): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Legion -# ************************************************************************/ +# ************************************************************************ +# * Legion +# ************************************************************************ class Legion(Klondike): @@ -1251,9 +1251,9 @@ class Legion(Klondike): self.s.talon.dealCards() -# /*********************************************************************** -# // Big Bertha -# ************************************************************************/ +# ************************************************************************ +# * Big Bertha +# ************************************************************************ class BigBertha(Game): @@ -1296,9 +1296,9 @@ class BigBertha(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Athena -# ************************************************************************/ +# ************************************************************************ +# * Athena +# ************************************************************************ class Athena(Klondike): @@ -1311,9 +1311,9 @@ class Athena(Klondike): self.s.talon.dealCards() -# /*********************************************************************** -# // Kingsley -# ************************************************************************/ +# ************************************************************************ +# * Kingsley +# ************************************************************************ class Kingsley(Klondike): @@ -1324,9 +1324,9 @@ class Kingsley(Klondike): Klondike.createGame(self, max_rounds=1) -# /*********************************************************************** -# // Scarp -# ************************************************************************/ +# ************************************************************************ +# * Scarp +# ************************************************************************ class Scarp(Klondike): Talon_Class = DealRowTalonStack @@ -1339,9 +1339,9 @@ class Scarp(Klondike): Klondike.startGame(self, flip=1) -# /*********************************************************************** -# // Eight Sages -# ************************************************************************/ +# ************************************************************************ +# * Eight Sages +# ************************************************************************ class EightSages_Row(AC_RowStack): def acceptsCards(self, from_stack, cards): diff --git a/pysollib/games/labyrinth.py b/pysollib/games/labyrinth.py index 6826786d..99179a71 100644 --- a/pysollib/games/labyrinth.py +++ b/pysollib/games/labyrinth.py @@ -36,9 +36,9 @@ from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // Labyrinth -# ************************************************************************/ +# ************************************************************************ +# * Labyrinth +# ************************************************************************ class Labyrinth_Talon(DealRowTalonStack): def dealCards(self, sound=False): diff --git a/pysollib/games/larasgame.py b/pysollib/games/larasgame.py index fb9ef7eb..9f28f2fe 100644 --- a/pysollib/games/larasgame.py +++ b/pysollib/games/larasgame.py @@ -35,17 +35,17 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class LarasGame_Hint(CautiousDefaultHint): pass -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class LarasGame_Talon(WasteTalonStack): # Deal a card to each of the RowStacks. Then deal @@ -184,9 +184,9 @@ class LarasGame_Reserve(OpenStack): getBottomImage = Stack._getReserveBottomImage -# /*********************************************************************** -# // Lara's Game -# ************************************************************************/ +# ************************************************************************ +# * Lara's Game +# ************************************************************************ class LarasGame(Game): Hint_Class = LarasGame_Hint @@ -408,9 +408,9 @@ class LarasGame(Game): -# /*********************************************************************** -# // Relaxed Lara's Game -# ************************************************************************/ +# ************************************************************************ +# * Relaxed Lara's Game +# ************************************************************************ class RelaxedLarasGame(LarasGame): Reserve_Class = LarasGame_Reserve @@ -419,9 +419,9 @@ class RelaxedLarasGame(LarasGame): MAX_ROUNDS = 2 -# /*********************************************************************** -# // Double Lara's Game -# ************************************************************************/ +# ************************************************************************ +# * Double Lara's Game +# ************************************************************************ class DoubleLarasGame(RelaxedLarasGame): Reserve_Cards = 2 diff --git a/pysollib/games/mahjongg/mahjongg.py b/pysollib/games/mahjongg/mahjongg.py index 43c00ba6..69132581 100644 --- a/pysollib/games/mahjongg/mahjongg.py +++ b/pysollib/games/mahjongg/mahjongg.py @@ -52,9 +52,9 @@ def factorial(x): return a -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Mahjongg_Hint(AbstractHint): # FIXME: no intelligence whatsoever is implemented here @@ -83,9 +83,9 @@ class Mahjongg_Hint(AbstractHint): i += 1 -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ #class Mahjongg_Foundation(AbstractFoundationStack): class Mahjongg_Foundation(OpenStack): @@ -123,9 +123,9 @@ class Mahjongg_Foundation(OpenStack): return '' -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Mahjongg_RowStack(OpenStack): def __init__(self, x, y, game, **cap): @@ -300,9 +300,9 @@ class Mahjongg_RowStack(OpenStack): return None -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class AbstractMahjonggGame(Game): Hint_Class = Mahjongg_Hint @@ -996,9 +996,9 @@ def comp_cardset(ncards): assert 0 <= ranks <= 10 and 0 <= trumps <= 12 return decks, ranks, trumps -# /*********************************************************************** -# // register a Mahjongg type game -# ************************************************************************/ +# ************************************************************************ +# * register a Mahjongg type game +# ************************************************************************ from new import classobj diff --git a/pysollib/games/mahjongg/mahjongg1.py b/pysollib/games/mahjongg/mahjongg1.py index 44be9d48..c4f26ba7 100644 --- a/pysollib/games/mahjongg/mahjongg1.py +++ b/pysollib/games/mahjongg/mahjongg1.py @@ -23,9 +23,9 @@ from mahjongg import r -# /*********************************************************************** -# // game definitions -# ************************************************************************/ +# ************************************************************************ +# * game definitions +# ************************************************************************ r(5001, "Altar", layout="0aaaacaaiaakaamaaoaaqaasaauaawaaCaaEaaacaccaicckccmccoccqccsccucawcaCcaEcaieckecmecoecqecsecueaweaigckgcmgcogcqgcsgcugawgaiiakiamiaoiaqiasiauiawiaokaqkaamacmaomaqmaCmaEmaaoacoaooaqoaCoaEohabhcbhCbhEbkpijpkipmhanhcnhCnhEnhpoobboDbobnoDnvlcvncvpcvrcvtcvlevnevpevrevtevlgwngwpgwrgvtgCocCqcCmeCoeCqeCse") r(5002, "Arena", layout="0eaadcaceabgaaiaaqabsacuadwaeyadaccccbecagcakcbmcaocascbuccwcdyccaebceaeeameauebwecyebagacgakgbmgaogawgbygcaibciaeiamiauibwicyidakcckbekagkakkbmkaokaskbukcwkdykeamdcmcembgmaimaqmbsmcumdwmeym") diff --git a/pysollib/games/mahjongg/mahjongg2.py b/pysollib/games/mahjongg/mahjongg2.py index 39cd344b..dfbe00f8 100644 --- a/pysollib/games/mahjongg/mahjongg2.py +++ b/pysollib/games/mahjongg/mahjongg2.py @@ -27,9 +27,9 @@ from mahjongg import r -# /*********************************************************************** -# // game definitions -# ************************************************************************/ +# ************************************************************************ +# * game definitions +# ************************************************************************ # r(5200, "Another Round", ncards=140, layout="0aagaaihbhacfachacjhdghdiaecaeeaegoehaeiaekaemhfdhffhfhhfjhflagaagcageogeaggoggagiogiagkogkagmagohhbhhdhhfhhhhhjhhlhhnaiaaicoicaieoieaigoigaiioiiaikoikaimoimaiohjbhjdhjfhjhhjjhjlhjnakaakcakeakgakiakkakmakoamaamcammamoaoaaocaoeaogaoiaokaomaoohpbhpdhpfhphhpjhplhpnaqaaqcoqcaqeoqeaqgoqgaqioqiaqkoqkaqmoqmaqohrbhrdhrfhrhhrjhrlhrnasaascaseoseasgosgasiosiaskoskasmasohtdhtfhthhtjhtlaucaueaugouhauiaukaumhvghviawfawhawjhxhaygayi") diff --git a/pysollib/games/mahjongg/mahjongg3.py b/pysollib/games/mahjongg/mahjongg3.py index f233f92d..bd687cd2 100644 --- a/pysollib/games/mahjongg/mahjongg3.py +++ b/pysollib/games/mahjongg/mahjongg3.py @@ -29,9 +29,9 @@ from mahjongg import r #r(5993, "AAA 3", ncards=20, layout="0daaCabdacKbbdcaCcbdcc") #r(5994, "AAA 4", ncards=20, layout="0daaDabdacdcaDcbdcc") -# /*********************************************************************** -# // game definitions -# ************************************************************************/ +# ************************************************************************ +# * game definitions +# ************************************************************************ r(5401, "Taipei", layout="0aagabbabdabjablhccacfachhckadbaddhdehdghdiadjadlhecaefoegaehhekafcifehfgvfgifiafkagahgcageaggoggagihgkagmhhaahcohehhfvhfhhhvhhohiahkhhmaiahidaieaigoigCigaiihijaimhjbajcojehjfvjfJjghjhvjhojiajkhjlakahkdakeakgokgCkgQkgakihkjakmhlbalcolehlfvlfJlghlhvlholialkhllamahmdameamgomgCmgamihmjammhnaanconehnfvnfhnhvnhoniankhnmaoahocaoeaogoogaoihokaomapcipehpgvpgipiapkhqcaqfoqgaqhhqkarbardhrehrghriarjarlhscasfashhskatbatdatjatlaug") r(5402, "Hare", layout="0aacaamacabccaceackbcmacobeacecbeebekcembeoofavfcofeofkvfmofobgacgcbgebgkcgmbgoaiabicbiebikbimaioakcakebkhakkakmamebmgbmiamkbogoohboicqfcqhcqjasejsfasgjshasijsjaskCtgCtibuddufduhdujbulovdCvgCviovlbwddwfdwhdwjbwlcyfcyhcyjbAhbCh") diff --git a/pysollib/games/mahjongg/shisensho.py b/pysollib/games/mahjongg/shisensho.py index 3298a511..c34b0c76 100644 --- a/pysollib/games/mahjongg/shisensho.py +++ b/pysollib/games/mahjongg/shisensho.py @@ -41,9 +41,9 @@ from pysollib.pysoltk import MfxCanvasText, MfxCanvasLine from mahjongg import Mahjongg_RowStack, AbstractMahjonggGame, comp_cardset -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Shisen_Hint(AbstractHint): TOP_MATCHING = False @@ -74,9 +74,9 @@ class NotShisen_Hint(Shisen_Hint): TOP_MATCHING = True -# /*********************************************************************** -# // Shisen-Sho -# ************************************************************************/ +# ************************************************************************ +# * Shisen-Sho +# ************************************************************************ class Shisen_Foundation(AbstractFoundationStack): @@ -460,9 +460,9 @@ class Shisen_24x12_NoGravity(AbstractShisenGame): GRAVITY = False -# /*********************************************************************** -# // Not Shisen-Sho -# ************************************************************************/ +# ************************************************************************ +# * Not Shisen-Sho +# ************************************************************************ class NotShisen_RowStack(Shisen_RowStack): def acceptsCards(self, from_stack, cards): @@ -492,9 +492,9 @@ class NotShisen_24x12(AbstractShisenGame): NCARDS = 288 -# /*********************************************************************** -# // register a Shisen-Sho type game -# ************************************************************************/ +# ************************************************************************ +# * register a Shisen-Sho type game +# ************************************************************************ def r(id, gameclass, name, rules_filename="shisensho.html"): decks, ranks, trumps = comp_cardset(gameclass.NCARDS) diff --git a/pysollib/games/matriarchy.py b/pysollib/games/matriarchy.py index 38c89bf8..72d0baa3 100644 --- a/pysollib/games/matriarchy.py +++ b/pysollib/games/matriarchy.py @@ -36,9 +36,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // Talon -# ************************************************************************/ +# ************************************************************************ +# * Talon +# ************************************************************************ class Matriarchy_Waste(WasteStack): def updateText(self): @@ -127,9 +127,9 @@ class Matriarchy_Talon(WasteTalonStack): self.texts.misc.config(text=t) -# /*********************************************************************** -# // Rows -# ************************************************************************/ +# ************************************************************************ +# * Rows +# ************************************************************************ class Matriarchy_UpRowStack(SS_RowStack): def __init__(self, x, y, game, suit): @@ -150,9 +150,9 @@ class Matriarchy_DownRowStack(SS_RowStack): getBottomImage = Stack._getSuitBottomImage -# /*********************************************************************** -# // Matriarchy -# ************************************************************************/ +# ************************************************************************ +# * Matriarchy +# ************************************************************************ class Matriarchy(Game): Hint_Class = CautiousDefaultHint diff --git a/pysollib/games/montana.py b/pysollib/games/montana.py index e489f463..31aed7eb 100644 --- a/pysollib/games/montana.py +++ b/pysollib/games/montana.py @@ -34,9 +34,9 @@ from pysollib.game import Game from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Montana_Hint(DefaultHint): def computeHints(self): @@ -67,9 +67,9 @@ class Montana_Hint(DefaultHint): self.addHint(score, 1, r, t) -# /*********************************************************************** -# // Montana -# ************************************************************************/ +# ************************************************************************ +# * Montana +# ************************************************************************ class Montana_Talon(TalonStack): def canDealCards(self): @@ -240,9 +240,9 @@ class Montana(Game): return 1 -# /*********************************************************************** -# // Spaces -# ************************************************************************/ +# ************************************************************************ +# * Spaces +# ************************************************************************ class Spaces_Talon(Montana_Talon): def getRedealSpaces(self, stacks, gaps): @@ -259,9 +259,9 @@ class Spaces(Montana): Talon_Class = StackWrapper(Spaces_Talon, max_rounds=3) -# /*********************************************************************** -# // Blue Moon -# ************************************************************************/ +# ************************************************************************ +# * Blue Moon +# ************************************************************************ class BlueMoon(Montana): RLEN, RSTEP, RBASE = 56, 14, 0 @@ -282,9 +282,9 @@ class BlueMoon(Montana): j += self.RSTEP -# /*********************************************************************** -# // Red Moon -# ************************************************************************/ +# ************************************************************************ +# * Red Moon +# ************************************************************************ class RedMoon(BlueMoon): def _shuffleHook(self, cards): @@ -303,9 +303,9 @@ class RedMoon(BlueMoon): self.s.talon.dealRow(rows=r[n:n+12], frames=frames) -# /*********************************************************************** -# // Galary -# ************************************************************************/ +# ************************************************************************ +# * Galary +# ************************************************************************ class Galary_Hint(Montana_Hint): @@ -345,18 +345,18 @@ class Galary(RedMoon): Hint_Class = Galary_Hint -# /*********************************************************************** -# // Moonlight -# ************************************************************************/ +# ************************************************************************ +# * Moonlight +# ************************************************************************ class Moonlight(Montana): RowStack_Class = Galary_RowStack Hint_Class = Galary_Hint -# /*********************************************************************** -# // Jungle -# ************************************************************************/ +# ************************************************************************ +# * Jungle +# ************************************************************************ class Jungle_RowStack(Montana_RowStack): def acceptsCards(self, from_stack, cards): @@ -373,9 +373,9 @@ class Jungle(BlueMoon): Hint_Class = Galary_Hint -# /*********************************************************************** -# // Spaces and Aces -# ************************************************************************/ +# ************************************************************************ +# * Spaces and Aces +# ************************************************************************ class SpacesAndAces_RowStack(Montana_RowStack): def acceptsCards(self, from_stack, cards): @@ -405,9 +405,9 @@ class SpacesAndAces(BlueMoon): continue self.s.talon.dealRow(rows=(self.s.rows[i],), frames=frames) -# /*********************************************************************** -# // Paganini -# ************************************************************************/ +# ************************************************************************ +# * Paganini +# ************************************************************************ class Paganini_Talon(Montana_Talon): def _inSequence(self, card, suit, rank): @@ -456,9 +456,9 @@ class Paganini(BlueMoon): return True -# /*********************************************************************** -# // Spoilt -# ************************************************************************/ +# ************************************************************************ +# * Spoilt +# ************************************************************************ class Spoilt_RowStack(BasicRowStack): def acceptsCards(self, from_stack, cards): @@ -565,9 +565,9 @@ class Spoilt(Game): return (), (), () -# /*********************************************************************** -# // Double Montana -# ************************************************************************/ +# ************************************************************************ +# * Double Montana +# ************************************************************************ class DoubleMontana(Montana): Talon_Class = InitialDealTalonStack diff --git a/pysollib/games/montecarlo.py b/pysollib/games/montecarlo.py index cf91dc4e..d8b95995 100644 --- a/pysollib/games/montecarlo.py +++ b/pysollib/games/montecarlo.py @@ -34,19 +34,19 @@ from pysollib.game import Game from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class MonteCarlo_Hint(DefaultHint): # FIXME: demo is not too clever in this game pass -# /*********************************************************************** -# // Monte Carlo -# // Monte Carlo (2 decks) -# ************************************************************************/ +# ************************************************************************ +# * Monte Carlo +# * Monte Carlo (2 decks) +# ************************************************************************ class MonteCarlo_Talon(TalonStack): def canDealCards(self): @@ -194,9 +194,9 @@ class MonteCarlo2Decks(MonteCarlo): pass -# /*********************************************************************** -# // Weddings -# ************************************************************************/ +# ************************************************************************ +# * Weddings +# ************************************************************************ class Weddings_Talon(MonteCarlo_Talon): def canDealCards(self): @@ -242,10 +242,10 @@ class Weddings(MonteCarlo): return n -# /*********************************************************************** -# // Simple Carlo (Monte Carlo for Children, stacks do not -# // have to be neighbours) -# ************************************************************************/ +# ************************************************************************ +# * Simple Carlo (Monte Carlo for Children, stacks do not +# * have to be neighbours) +# ************************************************************************ class SimpleCarlo(MonteCarlo): FILL_STACKS_AFTER_DROP = True @@ -257,9 +257,9 @@ class SimpleCarlo(MonteCarlo): return 0 <= stack1.id <= 24 and 0 <= stack2.id <= 24 -# /*********************************************************************** -# // Simple Pairs -# ************************************************************************/ +# ************************************************************************ +# * Simple Pairs +# ************************************************************************ class SimplePairs(MonteCarlo): def createGame(self): @@ -297,9 +297,9 @@ class SimplePairs(MonteCarlo): return 0 <= stack1.id <= 15 and 0 <= stack2.id <= 15 -# /*********************************************************************** -# // Neighbour -# ************************************************************************/ +# ************************************************************************ +# * Neighbour +# ************************************************************************ class Neighbour_Foundation(AbstractFoundationStack): def acceptsCards(self, from_stack, cards): @@ -362,9 +362,9 @@ class Neighbour(MonteCarlo): return card1.rank + card2.rank == 11 -# /*********************************************************************** -# // Fourteen -# ************************************************************************/ +# ************************************************************************ +# * Fourteen +# ************************************************************************ class Fourteen_RowStack(MonteCarlo_RowStack): def acceptsCards(self, from_stack, cards): @@ -426,9 +426,9 @@ class Fourteen(Game): return card1.rank + card2.rank == 12 -# /*********************************************************************** -# // Nestor -# ************************************************************************/ +# ************************************************************************ +# * Nestor +# ************************************************************************ class Nestor_RowStack(MonteCarlo_RowStack): def acceptsCards(self, from_stack, cards): @@ -516,9 +516,9 @@ class Nestor(Game): return card1.rank == card2.rank -# /*********************************************************************** -# // Vertical -# ************************************************************************/ +# ************************************************************************ +# * Vertical +# ************************************************************************ class Vertical(Nestor): @@ -563,9 +563,9 @@ class Vertical(Nestor): -# /*********************************************************************** -# // The Wish -# ************************************************************************/ +# ************************************************************************ +# * The Wish +# ************************************************************************ class TheWish(Game): @@ -626,9 +626,9 @@ class TheWishOpen(TheWish): self.startDealSample() self.s.talon.dealRow() -# /*********************************************************************** -# // Der letzte Monarch (The last Monarch) -# ************************************************************************/ +# ************************************************************************ +# * Der letzte Monarch (The last Monarch) +# ************************************************************************ class DerLetzteMonarch_Foundation(SS_FoundationStack): def acceptsCards(self, from_stack, cards): @@ -786,9 +786,9 @@ class TheLastMonarchII(DerLetzteMonarch): self.leaveState(old_state) -# /*********************************************************************** -# // Doublets -# ************************************************************************/ +# ************************************************************************ +# * Doublets +# ************************************************************************ class DoubletsII(Game): FILL_STACKS_AFTER_DROP = False # for Nestor_RowStack @@ -833,9 +833,9 @@ class DoubletsII(Game): self.leaveState(old_state) -# /*********************************************************************** -# // Right and Left -# ************************************************************************/ +# ************************************************************************ +# * Right and Left +# ************************************************************************ class RightAndLeft_Talon(DealRowRedealTalonStack): def _redeal(self, rows=None, reverse=False, frames=0): diff --git a/pysollib/games/napoleon.py b/pysollib/games/napoleon.py index a0014bc4..d2f9e071 100644 --- a/pysollib/games/napoleon.py +++ b/pysollib/games/napoleon.py @@ -39,9 +39,9 @@ from pysollib.pysoltk import MfxCanvasText from braid import Braid_Foundation -# /*********************************************************************** -# // stacks -# ************************************************************************/ +# ************************************************************************ +# * stacks +# ************************************************************************ class Napoleon_RowStack(UD_SS_RowStack): @@ -74,9 +74,9 @@ class Napoleon_FreeCell(ReserveStack): return ReserveStack.canMoveCards(self, cards) -# /*********************************************************************** -# // Der kleine Napoleon -# ************************************************************************/ +# ************************************************************************ +# * Der kleine Napoleon +# ************************************************************************ class DerKleineNapoleon(Game): @@ -177,10 +177,10 @@ class DerKleineNapoleon(Game): self.texts.info.config(text=t) -# /*********************************************************************** -# // Der freie Napoleon (completely equivalent to Der kleine Napoleon, -# // just a different layout) -# ************************************************************************/ +# ************************************************************************ +# * Der freie Napoleon (completely equivalent to Der kleine Napoleon, +# * just a different layout) +# ************************************************************************ class DerFreieNapoleon(DerKleineNapoleon): @@ -237,9 +237,9 @@ class DerFreieNapoleon(DerKleineNapoleon): l.defaultStackGroups() -# /*********************************************************************** -# // Napoleon (two FreeCells instead of one SingleFreeCell) -# ************************************************************************/ +# ************************************************************************ +# * Napoleon (two FreeCells instead of one SingleFreeCell) +# ************************************************************************ class Napoleon(DerKleineNapoleon): def createGame(self): @@ -252,9 +252,9 @@ class FreeNapoleon(DerFreieNapoleon): DerFreieNapoleon.createGame(self, cells=2) -# /*********************************************************************** -# // Master -# ************************************************************************/ +# ************************************************************************ +# * Master +# ************************************************************************ class Master(DerFreieNapoleon): @@ -268,10 +268,10 @@ class Master(DerFreieNapoleon): lambda c: (c.rank == ACE, c.suit)) -# /*********************************************************************** -# // The Little Corporal -# // Bonaparte -# ************************************************************************/ +# ************************************************************************ +# * The Little Corporal +# * Bonaparte +# ************************************************************************ class TheLittleCorporal_RowStack(UD_SS_RowStack): def acceptsCards(self, from_stack, cards): @@ -340,9 +340,9 @@ class Bonaparte(TheLittleCorporal): self.s.talon.dealBaseCards(ncards=4) -# /*********************************************************************** -# // Busy Cards -# ************************************************************************/ +# ************************************************************************ +# * Busy Cards +# ************************************************************************ class BusyCards_FreeCell(ReserveStack): def canMoveCards(self, cards): diff --git a/pysollib/games/needle.py b/pysollib/games/needle.py index 1b3b8d9b..fa55a122 100644 --- a/pysollib/games/needle.py +++ b/pysollib/games/needle.py @@ -36,11 +36,11 @@ from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // Needle -# // Haystack -# // Pitchfork -# ************************************************************************/ +# ************************************************************************ +# * Needle +# * Haystack +# * Pitchfork +# ************************************************************************ class Needle(Game): diff --git a/pysollib/games/numerica.py b/pysollib/games/numerica.py index 4d313ec1..c0818d98 100644 --- a/pysollib/games/numerica.py +++ b/pysollib/games/numerica.py @@ -36,9 +36,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.mfxutil import kwdefault -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Numerica_Hint(DefaultHint): # FIXME: demo is clueless @@ -65,9 +65,9 @@ class Numerica_Hint(DefaultHint): return score -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Numerica_RowStack(BasicRowStack): def acceptsCards(self, from_stack, cards): @@ -83,9 +83,9 @@ class Numerica_RowStack(BasicRowStack): return _('Tableau. Build regardless of rank and suit.') -# /*********************************************************************** -# // Numerica -# ************************************************************************/ +# ************************************************************************ +# * Numerica +# ************************************************************************ class Numerica(Game): Hint_Class = Numerica_Hint @@ -161,10 +161,10 @@ class Numerica2Decks(Numerica): Numerica.createGame(self, rows=6) -# /*********************************************************************** -# // Lady Betty -# // Last Chance -# ************************************************************************/ +# ************************************************************************ +# * Lady Betty +# * Last Chance +# ************************************************************************ class LadyBetty(Numerica): Foundation_Class = SS_FoundationStack @@ -202,9 +202,9 @@ class LastChance(LadyBetty): self.s.talon.dealCards() -# /*********************************************************************** -# // Puss in the Corner -# ************************************************************************/ +# ************************************************************************ +# * Puss in the Corner +# ************************************************************************ class PussInTheCorner_Talon(OpenTalonStack): rightclickHandler = OpenStack.rightclickHandler @@ -314,11 +314,11 @@ class PussInTheCorner(Numerica): return 0 -# /*********************************************************************** -# // Frog -# // Fly -# // Fanny -# ************************************************************************/ +# ************************************************************************ +# * Frog +# * Fly +# * Fanny +# ************************************************************************ class Frog(Game): @@ -410,9 +410,9 @@ class Fanny(Frog): self.s.talon.dealCards() -# /*********************************************************************** -# // Gnat -# ************************************************************************/ +# ************************************************************************ +# * Gnat +# ************************************************************************ class Gnat(Game): @@ -463,10 +463,10 @@ class Gnat(Game): self.s.talon.dealCards() -# /*********************************************************************** -# // Gloaming -# // Chamberlain -# ************************************************************************/ +# ************************************************************************ +# * Gloaming +# * Chamberlain +# ************************************************************************ class Gloaming_Hint(Numerica_Hint): def computeHints(self): @@ -553,9 +553,9 @@ class Chamberlain(Gloaming): Gloaming.createGame(self, reserves=4, rows=3) -# /*********************************************************************** -# // Toad -# ************************************************************************/ +# ************************************************************************ +# * Toad +# ************************************************************************ class Toad_TalonStack(DealRowTalonStack): @@ -609,9 +609,9 @@ class Toad(Game): self.s.talon.dealRow(rows=self.s.reserves) -# /*********************************************************************** -# // Shifting -# ************************************************************************/ +# ************************************************************************ +# * Shifting +# ************************************************************************ class Shifting_Hint(Numerica_Hint): shallMovePile = DefaultHint._cautiousShallMovePile @@ -636,9 +636,9 @@ class Shifting(Numerica): RowStack_Class = StackWrapper(Shifting_RowStack, max_accept=1) -# /*********************************************************************** -# // Strategerie -# ************************************************************************/ +# ************************************************************************ +# * Strategerie +# ************************************************************************ class Strategerie_Talon(OpenTalonStack): rightclickHandler = OpenStack.rightclickHandler @@ -695,10 +695,10 @@ class Strategerie(Game): self.s.talon.fillStack() -# /*********************************************************************** -# // Assembly -# // Anno Domini -# ************************************************************************/ +# ************************************************************************ +# * Assembly +# * Anno Domini +# ************************************************************************ class Assembly_RowStack(RK_RowStack): def acceptsCards(self, from_stack, cards): @@ -760,11 +760,11 @@ class AnnoDomini(Numerica): shallHighlightMatch = Game._shallHighlightMatch_ACW -# /*********************************************************************** -# // Circle Nine -# // Measure -# // Double Measure -# ************************************************************************/ +# ************************************************************************ +# * Circle Nine +# * Measure +# * Double Measure +# ************************************************************************ class CircleNine_RowStack(BasicRowStack): def acceptsCards(self, from_stack, cards): @@ -866,9 +866,9 @@ class DoubleMeasure(Measure): Measure.createGame(self, rows=10) -# /*********************************************************************** -# // Amphibian -# ************************************************************************/ +# ************************************************************************ +# * Amphibian +# ************************************************************************ class Amphibian(Game): Hint_Class = Gloaming_Hint @@ -917,9 +917,9 @@ class Amphibian(Game): self.leaveState(old_state) -# /*********************************************************************** -# // Aglet -# ************************************************************************/ +# ************************************************************************ +# * Aglet +# ************************************************************************ class Aglet(Game): diff --git a/pysollib/games/osmosis.py b/pysollib/games/osmosis.py index c70b3077..79b5972a 100644 --- a/pysollib/games/osmosis.py +++ b/pysollib/games/osmosis.py @@ -34,9 +34,9 @@ from pysollib.game import Game from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // Osmosis -# ************************************************************************/ +# ************************************************************************ +# * Osmosis +# ************************************************************************ class Osmosis_Foundation(AbstractFoundationStack): def acceptsCards(self, from_stack, cards): @@ -118,19 +118,19 @@ class Osmosis(Game): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Peek -# ************************************************************************/ +# ************************************************************************ +# * Peek +# ************************************************************************ class Peek(Osmosis): def startGame(self): Osmosis.startGame(self, flip=1) -# /*********************************************************************** -# // Treasure Trove -# // Peek II -# ************************************************************************/ +# ************************************************************************ +# * Treasure Trove +# * Peek II +# ************************************************************************ class OsmosisII_Foundation(AbstractFoundationStack): def acceptsCards(self, from_stack, cards): @@ -183,9 +183,9 @@ class PeekII(OsmosisII): OsmosisII.startGame(self, flip=1) -# /*********************************************************************** -# // Open Peek -# ************************************************************************/ +# ************************************************************************ +# * Open Peek +# ************************************************************************ class OpenPeek(Game): @@ -239,9 +239,9 @@ class OpenPeek(Game): self.s.talon.dealRow(rows=self.s.reserves) -# /*********************************************************************** -# // Genesis -# ************************************************************************/ +# ************************************************************************ +# * Genesis +# ************************************************************************ class Genesis(Game): @@ -292,9 +292,9 @@ class GenesisPlus(Genesis): Genesis.createGame(self, reserves=True) -# /*********************************************************************** -# // Bridesmaids -# ************************************************************************/ +# ************************************************************************ +# * Bridesmaids +# ************************************************************************ class Bridesmaids(Game): def createGame(self): diff --git a/pysollib/games/parallels.py b/pysollib/games/parallels.py index f3f77ae2..5066d85f 100644 --- a/pysollib/games/parallels.py +++ b/pysollib/games/parallels.py @@ -35,10 +35,10 @@ from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // Parallels -# // British Blockade -# ************************************************************************/ +# ************************************************************************ +# * Parallels +# * British Blockade +# ************************************************************************ class Parallels_RowStack(BasicRowStack): def basicIsBlocked(self): diff --git a/pysollib/games/pasdedeux.py b/pysollib/games/pasdedeux.py index 9742d197..212fc864 100644 --- a/pysollib/games/pasdedeux.py +++ b/pysollib/games/pasdedeux.py @@ -36,9 +36,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class PasDeDeux_Hint(AbstractHint): # FIXME: this is very simple @@ -85,9 +85,9 @@ class PasDeDeux_Hint(AbstractHint): self.addHint(score, 1, r, t) -# /*********************************************************************** -# // Pas de Deux -# ************************************************************************/ +# ************************************************************************ +# * Pas de Deux +# ************************************************************************ class PasDeDeux_Waste(WasteStack): def canFlipCard(self): diff --git a/pysollib/games/picturegallery.py b/pysollib/games/picturegallery.py index 9cf0c768..7adfb95a 100644 --- a/pysollib/games/picturegallery.py +++ b/pysollib/games/picturegallery.py @@ -34,9 +34,9 @@ from pysollib.game import Game from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class PictureGallery_Hint(AbstractHint): def computeHints(self): @@ -122,9 +122,9 @@ class PictureGallery_Hint(AbstractHint): self.addHint(self.SCORE_DEAL, 0, game.s.talon, None) -# /*********************************************************************** -# // Picture Gallery -# ************************************************************************/ +# ************************************************************************ +# * Picture Gallery +# ************************************************************************ # this Foundation only accepts Aces class PictureGallery_Foundation(RK_FoundationStack): @@ -173,9 +173,9 @@ class PictureGallery_RowStack(BasicRowStack): getBottomImage = Stack._getTalonBottomImage -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class PictureGallery(Game): Hint_Class = PictureGallery_Hint @@ -275,9 +275,9 @@ class PictureGallery(Game): -# /*********************************************************************** -# // Great Wheel -# ************************************************************************/ +# ************************************************************************ +# * Great Wheel +# ************************************************************************ class GreatWheel_Hint(PictureGallery_Hint): shallMovePile = PictureGallery_Hint._cautiousShallMovePile @@ -357,10 +357,10 @@ class GreatWheel(PictureGallery): return (card1.suit == card2.suit and (card1.rank + 2 == card2.rank or card2.rank + 2 == card1.rank)) -# /*********************************************************************** -# // Mount Olympus -# // Zeus -# ************************************************************************/ +# ************************************************************************ +# * Mount Olympus +# * Zeus +# ************************************************************************ class MountOlympus_Foundation(SS_FoundationStack): def getHelp(self): @@ -443,9 +443,9 @@ class Zeus(MountOlympus): self.s.talon.dealRow() -# /*********************************************************************** -# // Royal Parade -# ************************************************************************/ +# ************************************************************************ +# * Royal Parade +# ************************************************************************ class RoyalParade_TableauStack(PictureGallery_TableauStack): @@ -503,9 +503,9 @@ class RoyalParade(PictureGallery): self.s.talon.dealRow() -# /*********************************************************************** -# // Virginia Reel -# ************************************************************************/ +# ************************************************************************ +# * Virginia Reel +# ************************************************************************ class VirginiaReel_Talon(DealRowTalonStack): diff --git a/pysollib/games/pileon.py b/pysollib/games/pileon.py index a408558d..7d030e2c 100644 --- a/pysollib/games/pileon.py +++ b/pysollib/games/pileon.py @@ -36,9 +36,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // PileOn -# ************************************************************************/ +# ************************************************************************ +# * PileOn +# ************************************************************************ class PileOn_RowStack(RK_RowStack): getBottomImage = Stack._getReserveBottomImage @@ -129,10 +129,10 @@ class SmallPileOn(PileOn): ## GI.GT_2DECK_TYPE | GI.GT_OPEN,, 2, 0)) -# /*********************************************************************** -# // Foursome -# // Quartets -# ************************************************************************/ +# ************************************************************************ +# * Foursome +# * Quartets +# ************************************************************************ class Foursome(Game): Hint_Class = CautiousDefaultHint @@ -196,9 +196,9 @@ class Quartets(Foursome): self.s.talon.dealRowAvail() -# /*********************************************************************** -# // Four by Four -# ************************************************************************/ +# ************************************************************************ +# * Four by Four +# ************************************************************************ class FourByFour_Hint(DefaultHint): @@ -316,9 +316,9 @@ class FourByFour(Game): shallHighlightMatch = Game._shallHighlightMatch_RKW -# /*********************************************************************** -# // Footling -# ************************************************************************/ +# ************************************************************************ +# * Footling +# ************************************************************************ class Footling(FourByFour): Hint_Class = DefaultHint diff --git a/pysollib/games/pushpin.py b/pysollib/games/pushpin.py index 54aa25eb..ccb0f994 100644 --- a/pysollib/games/pushpin.py +++ b/pysollib/games/pushpin.py @@ -33,9 +33,9 @@ from pysollib.game import Game from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class PushPin_Hint(AbstractHint): @@ -225,9 +225,9 @@ class Queens(PushPin): self.s.talon.dealRow() -# /*********************************************************************** -# // Accordion -# ************************************************************************/ +# ************************************************************************ +# * Accordion +# ************************************************************************ class Accordion_Hint(AbstractHint): diff --git a/pysollib/games/pyramid.py b/pysollib/games/pyramid.py index 280d74e8..7a589200 100644 --- a/pysollib/games/pyramid.py +++ b/pysollib/games/pyramid.py @@ -36,9 +36,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Pyramid_Hint(DefaultHint): # consider moving card to the Talon as well @@ -47,9 +47,9 @@ class Pyramid_Hint(DefaultHint): return DefaultHint.step010(self, dropstacks, rows) -# /*********************************************************************** -# // basic logic for Talon, Waste and Rows -# ************************************************************************/ +# ************************************************************************ +# * basic logic for Talon, Waste and Rows +# ************************************************************************ class Pyramid_StackMethods: def acceptsCards(self, from_stack, cards): @@ -90,9 +90,9 @@ class Pyramid_StackMethods: self._dropPairMove(ncards, to_stack, frames=-1, shadow=shadow) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Pyramid_Foundation(AbstractFoundationStack): def acceptsCards(self, from_stack, cards): @@ -154,9 +154,9 @@ class Pyramid_RowStack(Pyramid_StackMethods, OpenStack): clone.blockmap = self.blockmap -# /*********************************************************************** -# // Pyramid -# ************************************************************************/ +# ************************************************************************ +# * Pyramid +# ************************************************************************ class Pyramid(Game): Hint_Class = Pyramid_Hint @@ -280,9 +280,9 @@ class Pyramid(Game): return card1.rank + card2.rank == 11 -# /*********************************************************************** -# // Relaxed Pyramid -# ************************************************************************/ +# ************************************************************************ +# * Relaxed Pyramid +# ************************************************************************ class RelaxedPyramid(Pyramid): # the pyramid must be empty @@ -290,9 +290,9 @@ class RelaxedPyramid(Pyramid): return getNumberOfFreeStacks(self.s.rows) == len(self.s.rows) -# /*********************************************************************** -# // Giza -# ************************************************************************/ +# ************************************************************************ +# * Giza +# ************************************************************************ class Giza_Reserve(Pyramid_StackMethods, OpenStack): def clickHandler(self, event): @@ -315,11 +315,11 @@ class Giza(Pyramid): self.s.talon.dealRow(frames=4) -# /*********************************************************************** -# // Thirteen -# // FIXME: UNFINISHED -# // (this doesn't work yet as 2 cards of the Waste should be playable) -# ************************************************************************/ +# ************************************************************************ +# * Thirteen +# * FIXME: UNFINISHED +# * (this doesn't work yet as 2 cards of the Waste should be playable) +# ************************************************************************ class Thirteen(Pyramid): @@ -370,9 +370,9 @@ class Thirteen(Pyramid): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Thirteens -# ************************************************************************/ +# ************************************************************************ +# * Thirteens +# ************************************************************************ class Thirteens(Pyramid): @@ -415,10 +415,10 @@ class Thirteens(Pyramid): self.s.talon.moveMove(1, stack) self.leaveState(old_state) -# /*********************************************************************** -# // Elevens -# // Suit Elevens -# ************************************************************************/ +# ************************************************************************ +# * Elevens +# * Suit Elevens +# ************************************************************************ class Elevens_RowStack(Giza_Reserve): ACCEPTED_SUM = 9 @@ -574,9 +574,9 @@ class SuitElevens(Elevens): Elevens.createGame(self, rows=3, cols=5) -# /*********************************************************************** -# // Fifteens -# ************************************************************************/ +# ************************************************************************ +# * Fifteens +# ************************************************************************ class Fifteens_RowStack(Elevens_RowStack): ACCEPTED_SUM = 13 @@ -641,9 +641,9 @@ class Fifteens(Elevens): self.leaveState(old_state) -# /*********************************************************************** -# // Triple Alliance -# ************************************************************************/ +# ************************************************************************ +# * Triple Alliance +# ************************************************************************ class TripleAlliance_Reserve(ReserveStack): def acceptsCards(self, from_stack, cards): @@ -723,9 +723,9 @@ class TripleAlliance(Game): return len(self.s.foundations[0].cards) == 51 -# /*********************************************************************** -# // Pharaohs -# ************************************************************************/ +# ************************************************************************ +# * Pharaohs +# ************************************************************************ class Pharaohs_RowStack(Pyramid_RowStack): def acceptsCards(self, from_stack, cards): @@ -784,9 +784,9 @@ class Pharaohs(Pyramid): card1.rank == card2.rank) -# /*********************************************************************** -# // Baroness -# ************************************************************************/ +# ************************************************************************ +# * Baroness +# ************************************************************************ class Baroness_Talon(DealRowTalonStack): def dealCards(self, sound=False): @@ -849,9 +849,9 @@ class Baroness(Pyramid): self.s.talon.dealRow() -# /*********************************************************************** -# // Apophis -# ************************************************************************/ +# ************************************************************************ +# * Apophis +# ************************************************************************ class Apophis_Hint(Pyramid_Hint): def computeHints(self): @@ -924,9 +924,9 @@ class Apophis(Pharaohs): def shallHighlightMatch(self, stack1, card1, stack2, card2): return card1.rank + card2.rank == 11 -# /*********************************************************************** -# // Cheops -# ************************************************************************/ +# ************************************************************************ +# * Cheops +# ************************************************************************ class Cheops_StackMethods(Pyramid_StackMethods): def acceptsCards(self, from_stack, cards): @@ -962,9 +962,9 @@ class Cheops(Pyramid): return abs(card1.rank-card2.rank) in (0,1) -# /*********************************************************************** -# // Exit -# ************************************************************************/ +# ************************************************************************ +# * Exit +# ************************************************************************ class Exit_RowStack(Elevens_RowStack): def acceptsCards(self, from_stack, cards): @@ -1062,9 +1062,9 @@ class Exit(Game): return self._checkPair(card1, card2) -# /*********************************************************************** -# // Two Pyramids -# ************************************************************************/ +# ************************************************************************ +# * Two Pyramids +# ************************************************************************ class TwoPyramids(Pyramid): @@ -1103,9 +1103,9 @@ class TwoPyramids(Pyramid): self.sg.openstacks.append(s.waste) -# /*********************************************************************** -# // King Tut -# ************************************************************************/ +# ************************************************************************ +# * King Tut +# ************************************************************************ class KingTut(RelaxedPyramid): @@ -1137,18 +1137,18 @@ class KingTut(RelaxedPyramid): self.sg.openstacks.append(s.waste) -# /*********************************************************************** -# // Double Pyramid -# ************************************************************************/ +# ************************************************************************ +# * Double Pyramid +# ************************************************************************ class DoublePyramid(Pyramid): def createGame(self): Pyramid.createGame(self, pyramid_len=9) -# /*********************************************************************** -# // Triangle -# ************************************************************************/ +# ************************************************************************ +# * Triangle +# ************************************************************************ class Triangle(Pyramid): @@ -1185,9 +1185,9 @@ class Triangle(Pyramid): self.sg.openstacks.append(s.waste) -# /*********************************************************************** -# // Up and Down -# ************************************************************************/ +# ************************************************************************ +# * Up and Down +# ************************************************************************ class UpAndDown(Pyramid): @@ -1233,9 +1233,9 @@ class UpAndDown(Pyramid): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Hurricane -# ************************************************************************/ +# ************************************************************************ +# * Hurricane +# ************************************************************************ class Hurricane_Hint(DefaultHint): def step010(self, dropstacks, rows): diff --git a/pysollib/games/royalcotillion.py b/pysollib/games/royalcotillion.py index 6eedba3c..244a4a6c 100644 --- a/pysollib/games/royalcotillion.py +++ b/pysollib/games/royalcotillion.py @@ -38,9 +38,9 @@ from pysollib.pysoltk import MfxCanvasText from unionsquare import UnionSquare_Foundation -# /*********************************************************************** -# // Royal Cotillion -# ************************************************************************/ +# ************************************************************************ +# * Royal Cotillion +# ************************************************************************ class RoyalCotillion_Foundation(SS_FoundationStack): def getBottomImage(self): @@ -118,9 +118,9 @@ class RoyalCotillion(Game): return (self.sg.dropstacks, self.sg.dropstacks, self.sg.dropstacks) -# /*********************************************************************** -# // Odd and Even -# ************************************************************************/ +# ************************************************************************ +# * Odd and Even +# ************************************************************************ class OddAndEven(RoyalCotillion): def createGame(self): @@ -165,9 +165,9 @@ class OddAndEven(RoyalCotillion): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Kingdom -# ************************************************************************/ +# ************************************************************************ +# * Kingdom +# ************************************************************************ class Kingdom(RoyalCotillion): Foundation_Class = RK_FoundationStack @@ -214,12 +214,12 @@ class Kingdom(RoyalCotillion): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Alhambra -# // Granada -# // Reserves -# // Grant's Reinforcement -# ************************************************************************/ +# ************************************************************************ +# * Alhambra +# * Granada +# * Reserves +# * Grant's Reinforcement +# ************************************************************************ class Alhambra_Hint(CautiousDefaultHint): def _getDropCardScore(self, score, color, r, t, ncards): @@ -393,9 +393,9 @@ class GrantsReinforcement(Reserves): shallHighlightMatch = Game._shallHighlightMatch_SSW -# /*********************************************************************** -# // Carpet -# ************************************************************************/ +# ************************************************************************ +# * Carpet +# ************************************************************************ class Carpet(Game): Foundation_Class = SS_FoundationStack @@ -445,9 +445,9 @@ class Carpet(Game): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // British Constitution -# ************************************************************************/ +# ************************************************************************ +# * British Constitution +# ************************************************************************ class BritishConstitution_RowStackMethods: def acceptsCards(self, from_stack, cards): @@ -550,9 +550,9 @@ class NewBritishConstitution(BritishConstitution): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Twenty -# ************************************************************************/ +# ************************************************************************ +# * Twenty +# ************************************************************************ class Twenty_RowStack(BasicRowStack): def acceptsCards(self, from_stack, cards): @@ -613,9 +613,9 @@ class Twenty(Game): self.leaveState(old_state) -# /*********************************************************************** -# // Three Pirates -# ************************************************************************/ +# ************************************************************************ +# * Three Pirates +# ************************************************************************ class ThreePirates_Talon(DealRowTalonStack): def dealCards(self, sound=False): @@ -670,9 +670,9 @@ class ThreePirates(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Frames -# ************************************************************************/ +# ************************************************************************ +# * Frames +# ************************************************************************ class Frames_Hint(CautiousDefaultHint): def computeHints(self): @@ -784,9 +784,9 @@ class Frames(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Royal Rendezvous -# ************************************************************************/ +# ************************************************************************ +# * Royal Rendezvous +# ************************************************************************ class RoyalRendezvous(Game): @@ -874,9 +874,9 @@ class RoyalRendezvous(Game): self.leaveState(old_state) -# /*********************************************************************** -# // Shady Lanes -# ************************************************************************/ +# ************************************************************************ +# * Shady Lanes +# ************************************************************************ class ShadyLanes_Hint(CautiousDefaultHint): def computeHints(self): @@ -964,10 +964,10 @@ class ShadyLanes(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Four Winds -# // Boxing the Compass -# ************************************************************************/ +# ************************************************************************ +# * Four Winds +# * Boxing the Compass +# ************************************************************************ class FourWinds(Game): @@ -1034,9 +1034,9 @@ class BoxingTheCompass(FourWinds): pass -# /*********************************************************************** -# // Colonel -# ************************************************************************/ +# ************************************************************************ +# * Colonel +# ************************************************************************ class Colonel_Hint(DefaultHint): def _getMoveCardBonus(self, r, t, pile, rpile): @@ -1138,9 +1138,9 @@ class Colonel(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // The Red and the Black -# ************************************************************************/ +# ************************************************************************ +# * The Red and the Black +# ************************************************************************ @@ -1209,9 +1209,9 @@ class TheRedAndTheBlack(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Twilight Zone -# ************************************************************************/ +# ************************************************************************ +# * Twilight Zone +# ************************************************************************ class TwilightZone_Foundation(AC_FoundationStack): def acceptsCards(self, from_stack, cards): diff --git a/pysollib/games/royaleast.py b/pysollib/games/royaleast.py index dbf4818f..70d9303c 100644 --- a/pysollib/games/royaleast.py +++ b/pysollib/games/royaleast.py @@ -34,9 +34,9 @@ from pysollib.game import Game from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // Royal East -# ************************************************************************/ +# ************************************************************************ +# * Royal East +# ************************************************************************ class RoyalEast(Game): Hint_Class = CautiousDefaultHint diff --git a/pysollib/games/sanibel.py b/pysollib/games/sanibel.py index a311b306..0a402bb4 100644 --- a/pysollib/games/sanibel.py +++ b/pysollib/games/sanibel.py @@ -36,10 +36,10 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint, Yukon_ from pysollib.games.gypsy import Gypsy -# /************************************************************************ -# // Sanibel -# // play similar to Yukon -# *************************************************************************/ +# ************************************************************************ +# * Sanibel +# * play similar to Yukon +# ************************************************************************ class Sanibel(Gypsy): Layout_Method = Layout.klondikeLayout diff --git a/pysollib/games/siebenbisas.py b/pysollib/games/siebenbisas.py index cf5696a8..7ee8e19d 100644 --- a/pysollib/games/siebenbisas.py +++ b/pysollib/games/siebenbisas.py @@ -34,9 +34,9 @@ from pysollib.game import Game from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class SiebenBisAs_Hint(CautiousDefaultHint): def computeHints(self): @@ -72,9 +72,9 @@ class SiebenBisAs_Hint(CautiousDefaultHint): return 0 return 1 -# /*********************************************************************** -# // Sieben bis As (Seven to Ace) -# ************************************************************************/ +# ************************************************************************ +# * Sieben bis As (Seven to Ace) +# ************************************************************************ class SiebenBisAs_Foundation(SS_FoundationStack): def acceptsCards(self, from_stack, cards): @@ -156,9 +156,9 @@ class SiebenBisAs(Game): shallHighlightMatch = Game._shallHighlightMatch_SSW -# /*********************************************************************** -# // Maze -# ************************************************************************/ +# ************************************************************************ +# * Maze +# ************************************************************************ class Maze_Hint(SiebenBisAs_Hint): def shallMovePile(self, from_stack, to_stack, pile, rpile): diff --git a/pysollib/games/simplex.py b/pysollib/games/simplex.py index bc3ea846..0b62a11e 100644 --- a/pysollib/games/simplex.py +++ b/pysollib/games/simplex.py @@ -36,9 +36,9 @@ from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // Simplex -# ************************************************************************/ +# ************************************************************************ +# * Simplex +# ************************************************************************ def isSameRankSequence(cards): c0 = cards[0] diff --git a/pysollib/games/special/hanoi.py b/pysollib/games/special/hanoi.py index 92d00b4c..4d15bdff 100644 --- a/pysollib/games/special/hanoi.py +++ b/pysollib/games/special/hanoi.py @@ -34,9 +34,9 @@ from pysollib.game import Game from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // Tower of Hanoy -# ************************************************************************/ +# ************************************************************************ +# * Tower of Hanoy +# ************************************************************************ class TowerOfHanoy_Hint(CautiousDefaultHint): # FIXME: demo is completely clueless @@ -103,9 +103,9 @@ class TowerOfHanoy(Game): return ((), (), self.sg.dropstacks) -# /*********************************************************************** -# // Hanoi Puzzle -# ************************************************************************/ +# ************************************************************************ +# * Hanoi Puzzle +# ************************************************************************ class HanoiPuzzle_RowStack(TowerOfHanoy_RowStack): def getBottomImage(self): diff --git a/pysollib/games/special/memory.py b/pysollib/games/special/memory.py index 23597b6a..01756f5a 100644 --- a/pysollib/games/special/memory.py +++ b/pysollib/games/special/memory.py @@ -36,9 +36,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Memory_RowStack(OpenStack): def clickHandler(self, event): @@ -85,9 +85,9 @@ class Memory_RowStack(OpenStack): return 0 -# /*********************************************************************** -# // Memory -# ************************************************************************/ +# ************************************************************************ +# * Memory +# ************************************************************************ class Memory24(Game): Hint_Class = None @@ -233,9 +233,9 @@ class Memory40(Memory24): PERFECT_SCORE = 100 # 5 * (8*5)/2 -# /*********************************************************************** -# // Concentration -# ************************************************************************/ +# ************************************************************************ +# * Concentration +# ************************************************************************ class Concentration_RowStack(Memory_RowStack): def _dropPairMove(self, n, other_stack, frames=-1, shadow=-1): diff --git a/pysollib/games/special/pegged.py b/pysollib/games/special/pegged.py index 491099d5..0d47aa94 100644 --- a/pysollib/games/special/pegged.py +++ b/pysollib/games/special/pegged.py @@ -34,9 +34,9 @@ from pysollib.game import Game from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Pegged_Hint(AbstractHint): # FIXME: no intelligence whatsoever is implemented here @@ -55,9 +55,9 @@ class Pegged_Hint(AbstractHint): self.addHint(score, 1, r, t) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Pegged_RowStack(ReserveStack): def acceptsCards(self, from_stack, cards): @@ -93,9 +93,9 @@ class Pegged_RowStack(ReserveStack): clone.pos = self.pos -# /*********************************************************************** -# // Pegged -# ************************************************************************/ +# ************************************************************************ +# * Pegged +# ************************************************************************ class Pegged(Game): Hint_Class = Pegged_Hint @@ -221,9 +221,9 @@ class Pegged7x7(Pegged): ROWS = (7, 7, 7, 7, 7, 7, 7) -# /*********************************************************************** -# // Pegged Triangle -# ************************************************************************/ +# ************************************************************************ +# * Pegged Triangle +# ************************************************************************ class PeggedTriangle1(Pegged): STEPS = ((-2, -4), (-2, 4), (-4, 0), (4, 0), (2, -4), (2, 4)) @@ -235,9 +235,9 @@ class PeggedTriangle2(PeggedTriangle1): -# /*********************************************************************** -# // register the games -# ************************************************************************/ +# ************************************************************************ +# * register the games +# ************************************************************************ def r(id, gameclass, name): ncards = 0 diff --git a/pysollib/games/special/poker.py b/pysollib/games/special/poker.py index 114680e0..c7c2df4c 100644 --- a/pysollib/games/special/poker.py +++ b/pysollib/games/special/poker.py @@ -36,9 +36,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // Poker Square -# ************************************************************************/ +# ************************************************************************ +# * Poker Square +# ************************************************************************ class PokerSquare_RowStack(ReserveStack): def clickHandler(self, event): @@ -236,9 +236,9 @@ One Pair''')) return -1, 0 -# /*********************************************************************** -# // Poker Shuffle -# ************************************************************************/ +# ************************************************************************ +# * Poker Shuffle +# ************************************************************************ class PokerShuffle_RowStack(ReserveStack): def moveMove(self, ncards, to_stack, frames=-1, shadow=-1): diff --git a/pysollib/games/special/tarock.py b/pysollib/games/special/tarock.py index d8a3ed94..43edd47e 100644 --- a/pysollib/games/special/tarock.py +++ b/pysollib/games/special/tarock.py @@ -41,17 +41,17 @@ from pysollib.games.braid import Braid_Foundation, Braid_BraidStack, \ from pysollib.games.bakersdozen import Cruel_Talon -# /*********************************************************************** -# // Tarock Talon Stacks -# ************************************************************************/ +# ************************************************************************ +# * Tarock Talon Stacks +# ************************************************************************ class Wicked_Talon(Cruel_Talon): pass -# /*********************************************************************** -# // Tarock Foundation Stacks -# ************************************************************************/ +# ************************************************************************ +# * Tarock Foundation Stacks +# ************************************************************************ class ImperialTrump_Foundation(SS_FoundationStack): def acceptsCards(self, from_stack, cards): @@ -64,9 +64,9 @@ class Ponytail_Foundation(Braid_Foundation): pass -# /*********************************************************************** -# // Tarock Row Stacks -# ************************************************************************/ +# ************************************************************************ +# * Tarock Row Stacks +# ************************************************************************ class Tarock_OpenStack(OpenStack): def __init__(self, x, y, game, yoffset=-1, **cap): @@ -201,9 +201,9 @@ class Nasty_RowStack(SS_RowStack): return cards[0].rank == 13 + 8 * (cards[0].suit == 4) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Tarock_GameMethods: SUITS = (_("Wand"), _("Sword"), _("Cup"), _("Coin"), _("Trump")) @@ -218,9 +218,9 @@ class AbstractTarockGame(Tarock_GameMethods, Game): pass -# /*********************************************************************** -# // Wheel of Fortune -# ************************************************************************/ +# ************************************************************************ +# * Wheel of Fortune +# ************************************************************************ class WheelOfFortune(AbstractTarockGame): Hint_Class = CautiousDefaultHint @@ -293,9 +293,9 @@ class WheelOfFortune(AbstractTarockGame): return 0 -# /*********************************************************************** -# // Imperial Trumps -# ************************************************************************/ +# ************************************************************************ +# * Imperial Trumps +# ************************************************************************ class ImperialTrumps(AbstractTarockGame): @@ -354,9 +354,9 @@ class ImperialTrumps(AbstractTarockGame): return 0 -# /*********************************************************************** -# // Pagat -# ************************************************************************/ +# ************************************************************************ +# * Pagat +# ************************************************************************ class Pagat(AbstractTarockGame): @@ -426,9 +426,9 @@ class Pagat(AbstractTarockGame): or card2.rank + 1 == card1.rank)) -# /*********************************************************************** -# // Skiz -# ************************************************************************/ +# ************************************************************************ +# * Skiz +# ************************************************************************ class Skiz(AbstractTarockGame): @@ -498,9 +498,9 @@ class Skiz(AbstractTarockGame): or card2.rank + 1 == card1.rank)) -# /*********************************************************************** -# // Fifteen Plus -# ************************************************************************/ +# ************************************************************************ +# * Fifteen Plus +# ************************************************************************ class FifteenPlus(AbstractTarockGame): Hint_Class = CautiousDefaultHint @@ -562,9 +562,9 @@ class FifteenPlus(AbstractTarockGame): or card2.rank + 1 == card1.rank)) -# /*********************************************************************** -# // Excuse -# ************************************************************************/ +# ************************************************************************ +# * Excuse +# ************************************************************************ class Excuse(AbstractTarockGame): Hint_Class = CautiousDefaultHint @@ -646,10 +646,10 @@ class Excuse(AbstractTarockGame): or card1.rank - 1 == card2.rank) -# /*********************************************************************** -# // Grasshopper -# // Double Grasshopper -# ************************************************************************/ +# ************************************************************************ +# * Grasshopper +# * Double Grasshopper +# ************************************************************************ class Grasshopper(AbstractTarockGame): GAME_VERSION = 2 @@ -737,9 +737,9 @@ class DoubleGrasshopper(Grasshopper): pass -# /*********************************************************************** -# // Ponytail -# ************************************************************************/ +# ************************************************************************ +# * Ponytail +# ************************************************************************ class Ponytail(Tarock_GameMethods, Braid): @@ -811,12 +811,12 @@ class Ponytail(Tarock_GameMethods, Braid): self.sg.dropstacks = [s.braid] + s.rows + [s.waste] -# /*********************************************************************** -# // Cavalier -# // Five Aces -# // Wicked -# // Nasty -# ************************************************************************/ +# ************************************************************************ +# * Cavalier +# * Five Aces +# * Wicked +# * Nasty +# ************************************************************************ class Cavalier(AbstractTarockGame): Layout_Method = Layout.bakersDozenLayout @@ -901,9 +901,9 @@ class Nasty(Wicked): RowStack_Class = StackWrapper(Nasty_RowStack, max_move=1, max_accept=1, base_rank=ANY_RANK) -# /*********************************************************************** -# // register the games -# ************************************************************************/ +# ************************************************************************ +# * register the games +# ************************************************************************ def r(id, gameclass, name, game_type, decks, redeals, skill_level): game_type = game_type | GI.GT_TAROCK | GI.GT_CONTRIB | GI.GT_ORIGINAL diff --git a/pysollib/games/spider.py b/pysollib/games/spider.py index f8b22fae..09c24281 100644 --- a/pysollib/games/spider.py +++ b/pysollib/games/spider.py @@ -37,9 +37,9 @@ from pysollib.hint import SpiderType_Hint, YukonType_Hint from pysollib.hint import FreeCellSolverWrapper -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Spider_Hint(SpiderType_Hint): # FIXME: demo is not too clever in this game @@ -69,9 +69,9 @@ class Spider_Hint(SpiderType_Hint): return True -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Spider_RowStack(Spider_SS_RowStack): canDropCards = BasicRowStack.spiderCanDropCards @@ -94,9 +94,9 @@ class SuperMoveSpider_RowStack(SuperMoveStack_StackMethods, Spider_RowStack): return num_seq <= max_move -# /*********************************************************************** -# // Relaxed Spider -# ************************************************************************/ +# ************************************************************************ +# * Relaxed Spider +# ************************************************************************ class RelaxedSpider(Game): Layout_Method = Layout.klondikeLayout @@ -135,9 +135,9 @@ class RelaxedSpider(Game): getQuickPlayScore = Game._getSpiderQuickPlayScore -# /*********************************************************************** -# // Spider -# ************************************************************************/ +# ************************************************************************ +# * Spider +# ************************************************************************ class Spider(RelaxedSpider): def canDealCards(self): @@ -159,9 +159,9 @@ class OpenSpider(Spider): Spider.startGame(self, flip=1) -# /*********************************************************************** -# // Black Widow -# ************************************************************************/ +# ************************************************************************ +# * Black Widow +# ************************************************************************ class BlackWidow_RowStack(RK_RowStack, Spider_RowStack): def canDropCards(self, stacks): @@ -172,9 +172,9 @@ class BlackWidow(Spider): RowStack_Class = BlackWidow_RowStack -# /*********************************************************************** -# // Scheidungsgrund (aka Grounds for a Divorce) -# ************************************************************************/ +# ************************************************************************ +# * Scheidungsgrund (aka Grounds for a Divorce) +# ************************************************************************ class GroundsForADivorce_Talon(TalonStack): # A single click deals a new cards to each non-empty row. @@ -206,9 +206,9 @@ class GroundsForADivorce(RelaxedSpider): shallHighlightMatch = Game._shallHighlightMatch_RKW -# /*********************************************************************** -# // Grandmother's Game -# ************************************************************************/ +# ************************************************************************ +# * Grandmother's Game +# ************************************************************************ class GrandmothersGame(RelaxedSpider): Layout_Method = Layout.harpLayout @@ -223,9 +223,9 @@ class GrandmothersGame(RelaxedSpider): self.s.talon.dealRow() -# /*********************************************************************** -# // Spiderette (Spider with one deck and 7 rows) -# ************************************************************************/ +# ************************************************************************ +# * Spiderette (Spider with one deck and 7 rows) +# ************************************************************************ class Spiderette(Spider): def createGame(self): @@ -238,17 +238,17 @@ class Spiderette(Spider): self.s.talon.dealRow() -# /*********************************************************************** -# // Baby Spiderette -# ************************************************************************/ +# ************************************************************************ +# * Baby Spiderette +# ************************************************************************ class BabySpiderette(Spiderette): RowStack_Class = BlackWidow_RowStack -# /*********************************************************************** -# // Will o' the Wisp (just like Spiderette) -# ************************************************************************/ +# ************************************************************************ +# * Will o' the Wisp (just like Spiderette) +# ************************************************************************ class WillOTheWisp(Spiderette): def startGame(self): @@ -258,9 +258,9 @@ class WillOTheWisp(Spiderette): self.s.talon.dealRow() -# /*********************************************************************** -# // Simple Simon -# ************************************************************************/ +# ************************************************************************ +# * Simple Simon +# ************************************************************************ class SimpleSimon(Spider): Talon_Class = InitialDealTalonStack @@ -283,9 +283,9 @@ class SimpleSimonII(SimpleSimon): RowStack_Class = StackWrapper(SuperMoveSpider_RowStack, mod=13) -# /*********************************************************************** -# // Rachel -# ************************************************************************/ +# ************************************************************************ +# * Rachel +# ************************************************************************ class Rachel(RelaxedSpider): Talon_Class = StackWrapper(WasteTalonStack, max_rounds=1) @@ -300,10 +300,10 @@ class Rachel(RelaxedSpider): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Scorpion - move cards like in Russian Solitaire -# // Scorpion Tail - building down by alternate color -# ************************************************************************/ +# ************************************************************************ +# * Scorpion - move cards like in Russian Solitaire +# * Scorpion Tail - building down by alternate color +# ************************************************************************ class Scorpion_RowStack(Yukon_SS_RowStack, Spider_RowStack): canDropCards = Spider_RowStack.canDropCards @@ -364,9 +364,9 @@ class TripleScorpion(Scorpion): self.s.talon.dealRow() -# /*********************************************************************** -# // Wasp -# ************************************************************************/ +# ************************************************************************ +# * Wasp +# ************************************************************************ class Wasp(Scorpion): RowStack_Class = Scorpion_RowStack # anything on an empty space @@ -379,10 +379,10 @@ class Wasp(Scorpion): self.s.talon.dealRow() -# /*********************************************************************** -# // Three Blind Mice -# // Farmer's Wife -# ************************************************************************/ +# ************************************************************************ +# * Three Blind Mice +# * Farmer's Wife +# ************************************************************************ class ThreeBlindMice(Scorpion): @@ -431,9 +431,9 @@ class HowTheyRun(ThreeBlindMice): ReserveStack_Class = ReserveStack -# /*********************************************************************** -# // Rouge et Noir -# ************************************************************************/ +# ************************************************************************ +# * Rouge et Noir +# ************************************************************************ class RougeEtNoir_RowStack(KingAC_RowStack): def canDropCards(self, stacks): @@ -482,9 +482,9 @@ class RougeEtNoir(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Mrs. Mop -# ************************************************************************/ +# ************************************************************************ +# * Mrs. Mop +# ************************************************************************ class MrsMop(RelaxedSpider): @@ -501,9 +501,9 @@ class MrsMop(RelaxedSpider): self.s.talon.dealRow() -# /*********************************************************************** -# // Cicely -# ************************************************************************/ +# ************************************************************************ +# * Cicely +# ************************************************************************ class Cicely_Talon(DealRowTalonStack): def dealCards(self, sound=False): @@ -566,11 +566,11 @@ class Cicely(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Trillium -# // Lily -# // Wake-Robin -# ************************************************************************/ +# ************************************************************************ +# * Trillium +# * Lily +# * Wake-Robin +# ************************************************************************ class Trillium(Game): @@ -639,9 +639,9 @@ class TripleWakeRobin(WakeRobin): Trillium.createGame(self, rows=13) -# /*********************************************************************** -# // Chelicera -# ************************************************************************/ +# ************************************************************************ +# * Chelicera +# ************************************************************************ class Chelicera_RowStack(Yukon_SS_RowStack): def fillStack(self): @@ -701,9 +701,9 @@ class Chelicera(Game): return True -# /*********************************************************************** -# // Scorpion Head -# ************************************************************************/ +# ************************************************************************ +# * Scorpion Head +# ************************************************************************ class ScorpionHead(Scorpion): @@ -741,9 +741,9 @@ class ScorpionHead(Scorpion): self.s.talon.dealRow(rows=rows[:3]) -# /*********************************************************************** -# // Spider Web -# ************************************************************************/ +# ************************************************************************ +# * Spider Web +# ************************************************************************ class SpiderWeb(RelaxedSpider): @@ -782,9 +782,9 @@ class SpiderWeb(RelaxedSpider): self.s.talon.dealRow(rows=self.s.rows[:3]) -# /*********************************************************************** -# // Simon Jester -# ************************************************************************/ +# ************************************************************************ +# * Simon Jester +# ************************************************************************ class SimonJester(Spider): Talon_Class = InitialDealTalonStack @@ -799,9 +799,9 @@ class SimonJester(Spider): self.s.talon.dealRow(rows=self.s.rows[1:]) -# /*********************************************************************** -# // Applegate -# ************************************************************************/ +# ************************************************************************ +# * Applegate +# ************************************************************************ class Applegate(Game): Hint_Class = YukonType_Hint @@ -850,14 +850,14 @@ class Applegate(Game): shallHighlightMatch = Game._shallHighlightMatch_SSW -# /*********************************************************************** -# // Big Spider -# // Spider 3x3 -# // Big Divorce -# // Spider (4 decks) -# // Very Big Divorce -# // Chinese Spider -# ************************************************************************/ +# ************************************************************************ +# * Big Spider +# * Spider 3x3 +# * Big Divorce +# * Spider (4 decks) +# * Very Big Divorce +# * Chinese Spider +# ************************************************************************ class BigSpider(Spider): def createGame(self): @@ -942,9 +942,9 @@ class ChineseSpider(Spider): self.s.talon.dealRow() -# /*********************************************************************** -# // York -# ************************************************************************/ +# ************************************************************************ +# * York +# ************************************************************************ class York(RelaxedSpider): @@ -976,10 +976,10 @@ class BigYork(York): self.s.talon.dealRow() self.s.talon.dealRow(rows=[self.s.rows[0],self.s.rows[-1]]) -# /*********************************************************************** -# // Spidike -# // Fred's Spider -# ************************************************************************/ +# ************************************************************************ +# * Spidike +# * Fred's Spider +# ************************************************************************ class Spidike(RelaxedSpider): RowStack_Class = StackWrapper(Spider_SS_RowStack, base_rank=KING) @@ -1021,10 +1021,10 @@ class FredsSpider3Decks(FredsSpider): Spidike.createGame(self, rows=13, playcards=26) -# /*********************************************************************** -# // Long Tail -# // Short Tail -# ************************************************************************/ +# ************************************************************************ +# * Long Tail +# * Short Tail +# ************************************************************************ class LongTail(RelaxedSpider): @@ -1076,9 +1076,9 @@ class ShortTail(LongTail): LongTail.createGame(self, rows=8, playcards=24) -# /*********************************************************************** -# // Incompatibility -# ************************************************************************/ +# ************************************************************************ +# * Incompatibility +# ************************************************************************ class Incompatibility(Spidike): Talon_Class = GroundsForADivorce_Talon @@ -1094,9 +1094,9 @@ class Incompatibility(Spidike): self.s.talon.dealRow() -# /*********************************************************************** -# // Scorpion II -# ************************************************************************/ +# ************************************************************************ +# * Scorpion II +# ************************************************************************ class ScorpionII(Scorpion): @@ -1108,9 +1108,9 @@ class ScorpionII(Scorpion): self.s.talon.dealRow() -# /*********************************************************************** -# // Tarantula -# ************************************************************************/ +# ************************************************************************ +# * Tarantula +# ************************************************************************ class Tarantula_RowStack(Spider_RowStack): def _isSequence(self, cards): @@ -1136,9 +1136,9 @@ class Tarantula(Spider): return 0 -# /*********************************************************************** -# // Fechter's Game -# ************************************************************************/ +# ************************************************************************ +# * Fechter's Game +# ************************************************************************ class FechtersGame_Talon(TalonStack): def dealCards(self, sound=True): @@ -1187,9 +1187,9 @@ class FechtersGame(RelaxedSpider): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Bebop -# ************************************************************************/ +# ************************************************************************ +# * Bebop +# ************************************************************************ class Bebop(Game): @@ -1239,9 +1239,9 @@ class Bebop(Game): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // The Jolly Roger -# ************************************************************************/ +# ************************************************************************ +# * The Jolly Roger +# ************************************************************************ class TheJollyRoger_Foundation(AbstractFoundationStack): diff --git a/pysollib/games/sthelena.py b/pysollib/games/sthelena.py index 9acd1c03..8b38b477 100644 --- a/pysollib/games/sthelena.py +++ b/pysollib/games/sthelena.py @@ -37,9 +37,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class StHelena_Talon(TalonStack): @@ -158,9 +158,9 @@ class StHelena(Game): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Box Kite -# ************************************************************************/ +# ************************************************************************ +# * Box Kite +# ************************************************************************ class BoxKite(StHelena): Talon_Class = InitialDealTalonStack @@ -171,9 +171,9 @@ class BoxKite(StHelena): -# /*********************************************************************** -# // Les Quatre Coins -# ************************************************************************/ +# ************************************************************************ +# * Les Quatre Coins +# ************************************************************************ class LesQuatreCoins_RowStack(UD_RK_RowStack): def acceptsCards(self, from_stack, cards): @@ -263,9 +263,9 @@ class LesQuatreCoins(Game): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Regal Family -# ************************************************************************/ +# ************************************************************************ +# * Regal Family +# ************************************************************************ class RegalFamily_RowStack(UD_SS_RowStack): def acceptsCards(self, from_stack, cards): diff --git a/pysollib/games/sultan.py b/pysollib/games/sultan.py index 258a7ebc..27e1850d 100644 --- a/pysollib/games/sultan.py +++ b/pysollib/games/sultan.py @@ -36,9 +36,9 @@ from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // Sultan -# ************************************************************************/ +# ************************************************************************ +# * Sultan +# ************************************************************************ class Sultan(Game): @@ -118,9 +118,9 @@ class SultanPlus(Sultan): Sultan.createGame(self, reserves=8) -# /*********************************************************************** -# // Boudoir -# ************************************************************************/ +# ************************************************************************ +# * Boudoir +# ************************************************************************ class Boudoir(Game): @@ -180,9 +180,9 @@ class Boudoir(Game): return (len(self.s.talon.cards) + len(self.s.waste.cards)) == 0 -# /*********************************************************************** -# // Captive Queens -# ************************************************************************/ +# ************************************************************************ +# * Captive Queens +# ************************************************************************ class CaptiveQueens(Game): @@ -227,9 +227,9 @@ class CaptiveQueens(Game): return (len(self.s.talon.cards) + len(self.s.waste.cards)) == 0 -# /*********************************************************************** -# // Contradance -# ************************************************************************/ +# ************************************************************************ +# * Contradance +# ************************************************************************ class Contradance(Game): @@ -272,9 +272,9 @@ class Contradance(Game): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Idle Aces -# ************************************************************************/ +# ************************************************************************ +# * Idle Aces +# ************************************************************************ class IdleAces_AceFoundation(AbstractFoundationStack): @@ -332,10 +332,10 @@ class IdleAces(Game): self.s.talon.dealCards() -# /*********************************************************************** -# // Lady of the Manor -# // Archway -# ************************************************************************/ +# ************************************************************************ +# * Lady of the Manor +# * Archway +# ************************************************************************ class LadyOfTheManor_RowStack(BasicRowStack): clickHandler = BasicRowStack.doubleclickHandler @@ -399,9 +399,9 @@ class LadyOfTheManor(Game): self.moveMove(1, self.s.talon, r, frames=4) -# /*********************************************************************** -# // Matrimony -# ************************************************************************/ +# ************************************************************************ +# * Matrimony +# ************************************************************************ class Matrimony_Talon(DealRowTalonStack): @@ -489,10 +489,10 @@ class Matrimony(Game): self.s.talon.dealRow() -# /*********************************************************************** -# // Picture Patience -# // Patriarchs -# ************************************************************************/ +# ************************************************************************ +# * Picture Patience +# * Patriarchs +# ************************************************************************ class PicturePatience(Game): @@ -566,10 +566,10 @@ class Patriarchs(PicturePatience): self.s.talon.dealCards() -# /*********************************************************************** -# // Sixes and Sevens -# // Two Rings -# ************************************************************************/ +# ************************************************************************ +# * Sixes and Sevens +# * Two Rings +# ************************************************************************ class SixesAndSevens(Game): @@ -681,9 +681,9 @@ class TwoRings(Game): self.s.talon.dealRow() -# /*********************************************************************** -# // Corner Suite -# ************************************************************************/ +# ************************************************************************ +# * Corner Suite +# ************************************************************************ class CornerSuite_RowStack(RK_RowStack): def acceptsCards(self, from_stack, cards): @@ -734,9 +734,9 @@ class CornerSuite(Game): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Marshal -# ************************************************************************/ +# ************************************************************************ +# * Marshal +# ************************************************************************ class Marshal_Hint(CautiousDefaultHint): def _getDropCardScore(self, score, color, r, t, ncards): @@ -791,9 +791,9 @@ class Marshal(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Royal Aids -# ************************************************************************/ +# ************************************************************************ +# * Royal Aids +# ************************************************************************ class RoyalAids(Game): @@ -855,9 +855,9 @@ class RoyalAids(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Circle Eight -# ************************************************************************/ +# ************************************************************************ +# * Circle Eight +# ************************************************************************ class CircleEight(Game): @@ -901,9 +901,9 @@ class CircleEight(Game): shallHighlightMatch = Game._shallHighlightMatch_RKW -# /*********************************************************************** -# // Adela -# ************************************************************************/ +# ************************************************************************ +# * Adela +# ************************************************************************ class Adela_Foundation(SS_FoundationStack): def acceptsCards(self, from_stack, cards): @@ -965,9 +965,9 @@ class Adela(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Toni -# ************************************************************************/ +# ************************************************************************ +# * Toni +# ************************************************************************ class Toni(Game): @@ -1016,9 +1016,9 @@ class Toni(Game): self.s.talon.dealRow() -# /*********************************************************************** -# // Khedive -# ************************************************************************/ +# ************************************************************************ +# * Khedive +# ************************************************************************ class Khedive(Game): @@ -1065,9 +1065,9 @@ class Khedive(Game): self.leaveState(old_state) -# /*********************************************************************** -# // Phalanx -# ************************************************************************/ +# ************************************************************************ +# * Phalanx +# ************************************************************************ class Phalanx(Game): @@ -1110,11 +1110,11 @@ class Phalanx(Game): -# /*********************************************************************** -# // Grandee -# // Turncoats -# // Voracious -# ************************************************************************/ +# ************************************************************************ +# * Grandee +# * Turncoats +# * Voracious +# ************************************************************************ class Grandee(Game): Hint_Class = CautiousDefaultHint @@ -1209,9 +1209,9 @@ class Voracious(Grandee): self.leaveState(old_state) -# /*********************************************************************** -# // Desert Island -# ************************************************************************/ +# ************************************************************************ +# * Desert Island +# ************************************************************************ class DesertIsland(Game): @@ -1265,9 +1265,9 @@ class DesertIsland(Game): return True -# /*********************************************************************** -# // Catherine the Great -# ************************************************************************/ +# ************************************************************************ +# * Catherine the Great +# ************************************************************************ class CatherineTheGreat(Game): Hint_Class = CautiousDefaultHint diff --git a/pysollib/games/takeaway.py b/pysollib/games/takeaway.py index c360a6c8..2d1ddcf4 100644 --- a/pysollib/games/takeaway.py +++ b/pysollib/games/takeaway.py @@ -35,9 +35,9 @@ from pysollib.game import Game from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // Take Away -# ************************************************************************/ +# ************************************************************************ +# * Take Away +# ************************************************************************ class TakeAway_Foundation(AbstractFoundationStack): @@ -102,9 +102,9 @@ class TakeAway(Game): self.s.talon.dealRow() -# /*********************************************************************** -# // Four Stacks -# ************************************************************************/ +# ************************************************************************ +# * Four Stacks +# ************************************************************************ class FourStacks_Foundation(AC_FoundationStack): def closeStack(self): @@ -117,9 +117,9 @@ class FourStacks(TakeAway): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Striptease -# ************************************************************************/ +# ************************************************************************ +# * Striptease +# ************************************************************************ class Striptease_RowStack(UD_RK_RowStack): def acceptsCards(self, from_stack, cards): diff --git a/pysollib/games/terrace.py b/pysollib/games/terrace.py index 62ad99b6..e011f341 100644 --- a/pysollib/games/terrace.py +++ b/pysollib/games/terrace.py @@ -35,9 +35,9 @@ from pysollib.game import Game from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Terrace_Talon(WasteTalonStack): def canDealCards(self): @@ -106,9 +106,9 @@ class Terrace_RowStack(AC_RowStack): getBottomImage = Stack._getReserveBottomImage -# /*********************************************************************** -# // Terrace -# ************************************************************************/ +# ************************************************************************ +# * Terrace +# ************************************************************************ class Terrace(Game): Talon_Class = Terrace_Talon @@ -210,9 +210,9 @@ class Terrace(Game): shallHighlightMatch = Game._shallHighlightMatch_ACW -# /*********************************************************************** -# // Queen of Italy -# ************************************************************************/ +# ************************************************************************ +# * Queen of Italy +# ************************************************************************ class QueenOfItaly(Terrace): Foundation_Class = StackWrapper(Terrace_AC_Foundation, max_move=1) @@ -220,20 +220,20 @@ class QueenOfItaly(Terrace): pass -# /*********************************************************************** -# // General's Patience -# ************************************************************************/ +# ************************************************************************ +# * General's Patience +# ************************************************************************ class GeneralsPatience(Terrace): Foundation_Class = Terrace_SS_Foundation INITIAL_RESERVE_CARDS = 13 -# /*********************************************************************** -# // Blondes and Brunettes -# // Falling Star -# // Wood -# ************************************************************************/ +# ************************************************************************ +# * Blondes and Brunettes +# * Falling Star +# * Wood +# ************************************************************************ class BlondesAndBrunettes(Terrace): INITIAL_RESERVE_CARDS = 10 @@ -272,18 +272,18 @@ class Wood(BlondesAndBrunettes): pass -# /*********************************************************************** -# // Signora -# ************************************************************************/ +# ************************************************************************ +# * Signora +# ************************************************************************ class Signora(Terrace): def startGame(self): Terrace.startGame(self, nrows=9) -# /*********************************************************************** -# // Madame -# ************************************************************************/ +# ************************************************************************ +# * Madame +# ************************************************************************ class Madame(Terrace): Talon_Class = WasteTalonStack @@ -295,9 +295,9 @@ class Madame(Terrace): self.s.talon.dealCards() -# /*********************************************************************** -# // Mamy Susan -# ************************************************************************/ +# ************************************************************************ +# * Mamy Susan +# ************************************************************************ class MamySusan_RowStack(AC_RowStack): def acceptsCards(self, from_stack, cards): @@ -335,9 +335,9 @@ class MamySusan(Terrace): pass -# /*********************************************************************** -# // Bastille Day -# ************************************************************************/ +# ************************************************************************ +# * Bastille Day +# ************************************************************************ class BastilleDay_BastilleStack(Stack): def clickHandler(self, event): diff --git a/pysollib/games/threepeaks.py b/pysollib/games/threepeaks.py index 1c7345b3..975d4ed8 100644 --- a/pysollib/games/threepeaks.py +++ b/pysollib/games/threepeaks.py @@ -38,9 +38,9 @@ from pysollib.pysoltk import MfxCanvasText from golf import Golf_Waste, Golf_Hint -# /*********************************************************************** -# // Three Peaks Row Stack -# ************************************************************************/ +# ************************************************************************ +# * Three Peaks Row Stack +# ************************************************************************ class ThreePeaks_TalonStack(WasteTalonStack): @@ -90,9 +90,9 @@ class ThreePeaks_RowStack(OpenStack): clickHandler = OpenStack.doubleclickHandler -# /*********************************************************************** -# // Three Peaks Game -# ************************************************************************/ +# ************************************************************************ +# * Three Peaks Game +# ************************************************************************ class ThreePeaks(Game): @@ -246,9 +246,9 @@ class ThreePeaks(Game): p.dump(self.peaks) -# /*********************************************************************** -# // Three Peaks Game Non-scoring -# ************************************************************************/ +# ************************************************************************ +# * Three Peaks Game Non-scoring +# ************************************************************************ class ThreePeaksNoScore(ThreePeaks): SCORING = 0 diff --git a/pysollib/games/tournament.py b/pysollib/games/tournament.py index bd72affc..29cbd14e 100644 --- a/pysollib/games/tournament.py +++ b/pysollib/games/tournament.py @@ -37,9 +37,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // Tournament -# ************************************************************************/ +# ************************************************************************ +# * Tournament +# ************************************************************************ class Tournament_Talon(DealRowRedealTalonStack): def dealCards(self, sound=False): @@ -145,9 +145,9 @@ class Tournament(Game): class LaNivernaise(Tournament): ROW_YOFFSET = False -# /*********************************************************************** -# // Kingsdown Eights -# ************************************************************************/ +# ************************************************************************ +# * Kingsdown Eights +# ************************************************************************ class KingsdownEights_Talon(DealRowTalonStack): def dealCards(self, sound=False): @@ -211,9 +211,9 @@ class KingsdownEights(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Saxony -# ************************************************************************/ +# ************************************************************************ +# * Saxony +# ************************************************************************ class Saxony_Reserve(SS_RowStack): getBottomImage = Stack._getReserveBottomImage @@ -263,9 +263,9 @@ class Saxony(Game): self.s.talon.dealCards() -# /*********************************************************************** -# // Ladies Battle -# ************************************************************************/ +# ************************************************************************ +# * Ladies Battle +# ************************************************************************ class LadiesBattle_RowStack(AC_RowStack): def acceptsCards(self, from_stack, cards): diff --git a/pysollib/games/ultra/dashavatara.py b/pysollib/games/ultra/dashavatara.py index 5eef5d20..7f3092c3 100644 --- a/pysollib/games/ultra/dashavatara.py +++ b/pysollib/games/ultra/dashavatara.py @@ -37,7 +37,7 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** +# ************************************************************************ # * Dashavatara Foundation Stacks # ***********************************************************************/ @@ -93,7 +93,7 @@ class AppachansWaterfall_Foundation(AbstractFoundationStack): -# /*********************************************************************** +# ************************************************************************ # * Dashavatara Row Stacks # ***********************************************************************/ @@ -284,9 +284,9 @@ class AppachansWaterfall_RowStack(RK_RowStack): -# /*********************************************************************** -# // Dashavatara Game Stacks -# ************************************************************************/ +# ************************************************************************ +# * Dashavatara Game Stacks +# ************************************************************************ class Dashavatara_TableauStack(Dashavatara_OpenStack): @@ -336,7 +336,7 @@ class Dashavatara_RowStack(BasicRowStack): return self.game.app.images.getTalonBottom() -# /*********************************************************************** +# ************************************************************************ # * # ***********************************************************************/ @@ -364,7 +364,7 @@ class Journey_Hint(DefaultHint): pass -# /*********************************************************************** +# ************************************************************************ # * Dashavatara Circles # ***********************************************************************/ @@ -436,7 +436,7 @@ class DashavataraCircles(AbstractDashavataraGame): -# /*********************************************************************** +# ************************************************************************ # * Ten Avatars # ***********************************************************************/ @@ -502,7 +502,7 @@ class TenAvatars(AbstractDashavataraGame): -# /*********************************************************************** +# ************************************************************************ # * Balarama # ***********************************************************************/ @@ -563,7 +563,7 @@ class Balarama(AbstractDashavataraGame): -# /*********************************************************************** +# ************************************************************************ # * Hayagriva # ***********************************************************************/ @@ -587,7 +587,7 @@ class Hayagriva(Balarama): -# /*********************************************************************** +# ************************************************************************ # * Shanka # ***********************************************************************/ @@ -615,7 +615,7 @@ class Shanka(Balarama): -# /*********************************************************************** +# ************************************************************************ # * Surukh # ***********************************************************************/ @@ -648,7 +648,7 @@ class Surukh(Balarama): -# /*********************************************************************** +# ************************************************************************ # * Matsya # ***********************************************************************/ @@ -705,7 +705,7 @@ class Matsya(AbstractDashavataraGame): -# /*********************************************************************** +# ************************************************************************ # * Kurma # ***********************************************************************/ @@ -725,7 +725,7 @@ class Kurma(Matsya): -# /*********************************************************************** +# ************************************************************************ # * Varaha # ***********************************************************************/ @@ -745,7 +745,7 @@ class Varaha(Matsya): -# /*********************************************************************** +# ************************************************************************ # * Narasimha # ***********************************************************************/ @@ -770,7 +770,7 @@ class Narasimha(Matsya): -# /*********************************************************************** +# ************************************************************************ # * Vamana # ***********************************************************************/ @@ -795,7 +795,7 @@ class Vamana(Matsya): -# /*********************************************************************** +# ************************************************************************ # * Parashurama # ***********************************************************************/ @@ -819,9 +819,9 @@ class Parashurama(Matsya): -# /*********************************************************************** -# // Journey to Cuddapah -# ************************************************************************/ +# ************************************************************************ +# * Journey to Cuddapah +# ************************************************************************ class Journey(AbstractDashavataraGame): Hint_Class = Journey_Hint @@ -959,9 +959,9 @@ class Journey(AbstractDashavataraGame): -# /*********************************************************************** -# // Long Journey to Cuddapah -# ************************************************************************/ +# ************************************************************************ +# * Long Journey to Cuddapah +# ************************************************************************ class LongJourney(Journey): @@ -970,7 +970,7 @@ class LongJourney(Journey): -# /*********************************************************************** +# ************************************************************************ # * Appachan's Waterfall # ***********************************************************************/ @@ -1027,9 +1027,9 @@ class AppachansWaterfall(AbstractDashavataraGame): -# /*********************************************************************** -# // Hiranyaksha -# ************************************************************************/ +# ************************************************************************ +# * Hiranyaksha +# ************************************************************************ class Hiranyaksha(AbstractDashavataraGame): RowStack_Class = StackWrapper(Dashavatara_RK_RowStack, base_rank=NO_RANK) @@ -1114,9 +1114,9 @@ class Hiranyaksha(AbstractDashavataraGame): -# /*********************************************************************** -# // Dashavatara Hint -# ************************************************************************/ +# ************************************************************************ +# * Dashavatara Hint +# ************************************************************************ class Dashavatara_Hint(AbstractHint): def computeHints(self): @@ -1182,9 +1182,9 @@ class Dashavatara_Hint(AbstractHint): self.addHint(self.SCORE_DEAL, 0, game.s.talon, None) -# /*********************************************************************** -# // Dashavatara -# ************************************************************************/ +# ************************************************************************ +# * Dashavatara +# ************************************************************************ class Dashavatara(Game): Hint_Class = Dashavatara_Hint @@ -1258,7 +1258,7 @@ class Dashavatara(Game): return () -# /*********************************************************************** +# ************************************************************************ # * # ***********************************************************************/ diff --git a/pysollib/games/ultra/hanafuda.py b/pysollib/games/ultra/hanafuda.py index d48694ad..7c6095ef 100644 --- a/pysollib/games/ultra/hanafuda.py +++ b/pysollib/games/ultra/hanafuda.py @@ -39,7 +39,7 @@ from pysollib.pysoltk import MfxCanvasText from hanafuda_common import * -# /*********************************************************************** +# ************************************************************************ # * Flower Clock # ***********************************************************************/ @@ -112,7 +112,7 @@ class FlowerClock(AbstractFlowerGame): -# /*********************************************************************** +# ************************************************************************ # * Gaji # ***********************************************************************/ @@ -198,7 +198,7 @@ class Gaji(AbstractFlowerGame): -# /*********************************************************************** +# ************************************************************************ # * Oonsoo # ***********************************************************************/ @@ -254,18 +254,18 @@ class Oonsoo(AbstractFlowerGame): -# /*********************************************************************** +# ************************************************************************ # * Oonsoo Too -# ************************************************************************/ +# ************************************************************************ class OonsooToo(Oonsoo): Reserves = 1 -# /*********************************************************************** +# ************************************************************************ # * Oonsoo Strict -# ************************************************************************/ +# ************************************************************************ class OonsooStrict(Oonsoo): RowStack_Class = Hanafuda_SequenceStack @@ -274,18 +274,18 @@ class OonsooStrict(Oonsoo): -# /*********************************************************************** +# ************************************************************************ # * Oonsoo Open -# ************************************************************************/ +# ************************************************************************ class OonsooOpen(Oonsoo): BaseRank = ANY_RANK -# /*********************************************************************** +# ************************************************************************ # * Oonsoo Times Two -# ************************************************************************/ +# ************************************************************************ class OonsooTimesTwo(Oonsoo): Rows = 24 @@ -293,7 +293,7 @@ class OonsooTimesTwo(Oonsoo): -# /*********************************************************************** +# ************************************************************************ # * Pagoda # ***********************************************************************/ @@ -390,7 +390,7 @@ class Pagoda(AbstractFlowerGame): -# /*********************************************************************** +# ************************************************************************ # * Matsukiri # ***********************************************************************/ @@ -449,7 +449,7 @@ class MatsuKiriStrict(MatsuKiri): Strictness = 1 -# /*********************************************************************** +# ************************************************************************ # * Great Wall # ***********************************************************************/ @@ -539,9 +539,9 @@ class GreatWall(AbstractFlowerGame): -# /*********************************************************************** +# ************************************************************************ # * Four Winds -# ************************************************************************/ +# ************************************************************************ class FourWinds(AbstractFlowerGame): @@ -615,9 +615,9 @@ class FourWinds(AbstractFlowerGame): -# /*********************************************************************** +# ************************************************************************ # * Sumo -# ************************************************************************/ +# ************************************************************************ class Sumo(AbstractFlowerGame): Layout_Method = Layout.sumoLayout @@ -661,9 +661,9 @@ class Sumo(AbstractFlowerGame): -# /*********************************************************************** +# ************************************************************************ # * Big Sumo -# ************************************************************************/ +# ************************************************************************ class BigSumo(AbstractFlowerGame): Layout_Method = Layout.sumoLayout @@ -706,9 +706,9 @@ class BigSumo(AbstractFlowerGame): -# /*********************************************************************** +# ************************************************************************ # * Samuri -# ************************************************************************/ +# ************************************************************************ class Samuri(AbstractFlowerGame): Layout_Method = Layout.samuriLayout @@ -768,7 +768,7 @@ class Samuri(AbstractFlowerGame): -# /*********************************************************************** +# ************************************************************************ # * Double Samuri # ***********************************************************************/ @@ -777,7 +777,7 @@ class DoubleSamuri(Samuri): -# /*********************************************************************** +# ************************************************************************ # * Super Samuri # ***********************************************************************/ @@ -786,9 +786,9 @@ class SuperSamuri(DoubleSamuri): -# /*********************************************************************** +# ************************************************************************ # * Little Easy -# ************************************************************************/ +# ************************************************************************ class LittleEasy(AbstractFlowerGame): Layout_Method = Layout.easyLayout @@ -837,9 +837,9 @@ class LittleEasy(AbstractFlowerGame): -# /*********************************************************************** +# ************************************************************************ # * Easy x One -# ************************************************************************/ +# ************************************************************************ class EasyX1(LittleEasy): @@ -848,27 +848,27 @@ class EasyX1(LittleEasy): -# /*********************************************************************** +# ************************************************************************ # * Relax -# ************************************************************************/ +# ************************************************************************ class Relax(EasyX1): RowStack_Class = Oonsoo_SequenceStack -# /*********************************************************************** +# ************************************************************************ # * Big Easy -# ************************************************************************/ +# ************************************************************************ class BigEasy(LittleEasy): Rows = 11 -# /*********************************************************************** +# ************************************************************************ # * Easy Supreme -# ************************************************************************/ +# ************************************************************************ class EasySupreme(LittleEasy): Rows = 11 @@ -876,9 +876,9 @@ class EasySupreme(LittleEasy): -# /*********************************************************************** +# ************************************************************************ # * Just For Fun -# ************************************************************************/ +# ************************************************************************ class JustForFun(AbstractFlowerGame): Layout_Method = Layout.funLayout @@ -926,9 +926,9 @@ class JustForFun(AbstractFlowerGame): -# /*********************************************************************** +# ************************************************************************ # * Double Your Fun -# ************************************************************************/ +# ************************************************************************ class DoubleYourFun(JustForFun): Rows = 18 @@ -936,9 +936,9 @@ class DoubleYourFun(JustForFun): -# /*********************************************************************** +# ************************************************************************ # * Firecracker -# ************************************************************************/ +# ************************************************************************ class Firecracker(JustForFun): RowStack_Class = Oonsoo_SequenceStack @@ -947,18 +947,18 @@ class Firecracker(JustForFun): -# /*********************************************************************** +# ************************************************************************ # * Cherry Bomb -# ************************************************************************/ +# ************************************************************************ class CherryBomb(Firecracker): Rows = 18 -# /*********************************************************************** +# ************************************************************************ # * Paulownia -# ************************************************************************/ +# ************************************************************************ class Paulownia(AbstractFlowerGame): Layout_Method = Layout.klondikeLayout @@ -1008,9 +1008,9 @@ class Paulownia(AbstractFlowerGame): -# /*********************************************************************** -# // Register the games -# ************************************************************************/ +# ************************************************************************ +# * Register the games +# ************************************************************************ def r(id, gameclass, name, game_type, decks, redeals, skill_level): game_type = game_type | GI.GT_HANAFUDA diff --git a/pysollib/games/ultra/hanafuda1.py b/pysollib/games/ultra/hanafuda1.py index 0341dd5b..58b945b1 100644 --- a/pysollib/games/ultra/hanafuda1.py +++ b/pysollib/games/ultra/hanafuda1.py @@ -38,9 +38,9 @@ from pysollib.pysoltk import MfxCanvasText from hanafuda_common import * -# /*********************************************************************** +# ************************************************************************ # * Paulownia -# ************************************************************************/ +# ************************************************************************ class Paulownia(AbstractFlowerGame): Layout_Method = Layout.klondikeLayout @@ -111,9 +111,9 @@ class Iris(Peony): -# /*********************************************************************** -# // Queue -# ************************************************************************/ +# ************************************************************************ +# * Queue +# ************************************************************************ class LesserQueue(AbstractFlowerGame): Hint_Class = Queue_Hint @@ -271,9 +271,9 @@ class GreaterQueue(LesserQueue): -# /*********************************************************************** +# ************************************************************************ # * Japanese Garden -# ************************************************************************/ +# ************************************************************************ class JapaneseGarden(AbstractFlowerGame): Hint_Class = CautiousDefaultHint @@ -393,9 +393,9 @@ class SixTengus(SixSages): -# /*********************************************************************** +# ************************************************************************ # * Hanafuda Four Seasons -# ************************************************************************/ +# ************************************************************************ class HanafudaFourSeasons(AbstractFlowerGame): @@ -456,9 +456,9 @@ class HanafudaFourSeasons(AbstractFlowerGame): -# /*********************************************************************** -# // Wisteria -# ************************************************************************/ +# ************************************************************************ +# * Wisteria +# ************************************************************************ class Wisteria(AbstractFlowerGame): RowStack_Class = StackWrapper(Hanafuda_SequenceStack, base_rank=NO_RANK) @@ -507,9 +507,9 @@ class Wisteria(AbstractFlowerGame): -# /*********************************************************************** -# // Flower Arrangement Hint -# ************************************************************************/ +# ************************************************************************ +# * Flower Arrangement Hint +# ************************************************************************ class FlowerArrangement_Hint(AbstractHint): def computeHints(self): @@ -575,9 +575,9 @@ class FlowerArrangement_Hint(AbstractHint): self.addHint(self.SCORE_DEAL, 0, game.s.talon, None) -# /*********************************************************************** -# // Flower Arrangement Stacks -# ************************************************************************/ +# ************************************************************************ +# * Flower Arrangement Stacks +# ************************************************************************ class FlowerArrangement_TableauStack(Flower_OpenStack): def __init__(self, x, y, game, yoffset, **cap): @@ -611,9 +611,9 @@ class FlowerArrangement_RowStack(BasicRowStack): return self.game.app.images.getTalonBottom() -# /*********************************************************************** -# // Flower Arrangement -# ************************************************************************/ +# ************************************************************************ +# * Flower Arrangement +# ************************************************************************ class FlowerArrangement(Game): Hint_Class = FlowerArrangement_Hint @@ -685,9 +685,9 @@ class FlowerArrangement(Game): return () -# /*********************************************************************** +# ************************************************************************ # * Register the games -# ************************************************************************/ +# ************************************************************************ def r(id, gameclass, name, game_type, decks, redeals, skill_level): game_type = game_type | GI.GT_HANAFUDA diff --git a/pysollib/games/ultra/hanafuda_common.py b/pysollib/games/ultra/hanafuda_common.py index e95abfae..b4b95416 100644 --- a/pysollib/games/ultra/hanafuda_common.py +++ b/pysollib/games/ultra/hanafuda_common.py @@ -60,7 +60,7 @@ from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** +# ************************************************************************ # * # ***********************************************************************/ @@ -78,7 +78,7 @@ class Queue_Hint(DefaultHint): -# /*********************************************************************** +# ************************************************************************ # * Flower Foundation Stacks # ***********************************************************************/ @@ -265,7 +265,7 @@ class Queue_Foundation(AbstractFoundationStack): -# /*********************************************************************** +# ************************************************************************ # * Flower Row Stacks # ***********************************************************************/ diff --git a/pysollib/games/ultra/hexadeck.py b/pysollib/games/ultra/hexadeck.py index 300eb367..50e150ce 100644 --- a/pysollib/games/ultra/hexadeck.py +++ b/pysollib/games/ultra/hexadeck.py @@ -37,9 +37,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // Hex A Deck Foundation Stacks -# ************************************************************************/ +# ************************************************************************ +# * Hex A Deck Foundation Stacks +# ************************************************************************ class HexADeck_FoundationStack(SS_FoundationStack): def __init__(self, x, y, game, suit, **cap): @@ -75,9 +75,9 @@ class Merlins_Foundation(AbstractFoundationStack): return (self.cards[-1].rank + stack_dir) % self.cap.mod == cards[0].rank -# /*********************************************************************** -# // Hex A Deck Row Stacks -# ************************************************************************/ +# ************************************************************************ +# * Hex A Deck Row Stacks +# ************************************************************************ class HexADeck_OpenStack(OpenStack): @@ -261,9 +261,9 @@ class Merlins_ReserveStack(ReserveStack): return self.game.app.images.getTalonBottom() -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class AbstractHexADeckGame(Game): RANKS = (_("Ace"), "2", "3", "4", "5", "6", "7", "8", "9", @@ -274,9 +274,9 @@ class Merlins_Hint(DefaultHint): pass -# /*********************************************************************** -# // Bits n Bytes -# ************************************************************************/ +# ************************************************************************ +# * Bits n Bytes +# ************************************************************************ class BitsNBytes(Game): @@ -383,9 +383,9 @@ class BitsNBytes(Game): return 0 -# /*********************************************************************** -# // Hex A Klon -# ************************************************************************/ +# ************************************************************************ +# * Hex A Klon +# ************************************************************************ class HexAKlon(Game): Hint_Class = CautiousDefaultHint @@ -442,9 +442,9 @@ class HexAKlon(Game): (card1.rank + 1 == card2.rank or card2.rank + 1 == card1.rank)) -# /*********************************************************************** -# // Hex A Klon by Threes -# ************************************************************************/ +# ************************************************************************ +# * Hex A Klon by Threes +# ************************************************************************ class HexAKlonByThrees(Game): Hint_Class = CautiousDefaultHint @@ -501,9 +501,9 @@ class HexAKlonByThrees(Game): (card1.rank + 1 == card2.rank or card2.rank + 1 == card1.rank)) -# /*********************************************************************** -# // King Only Hex A Klon -# ************************************************************************/ +# ************************************************************************ +# * King Only Hex A Klon +# ************************************************************************ class KingOnlyHexAKlon(Game): Hint_Class = CautiousDefaultHint @@ -571,9 +571,9 @@ class KingOnlyHexAKlon(Game): (card1.rank + 1 == card2.rank or card2.rank + 1 == card1.rank)) -# /*********************************************************************** -# // Klondike Plus 16 -# ************************************************************************/ +# ************************************************************************ +# * Klondike Plus 16 +# ************************************************************************ class KlondikePlus16(Game): Hint_Class = CautiousDefaultHint @@ -627,9 +627,9 @@ class KlondikePlus16(Game): (card1.rank + 1 == card2.rank or card2.rank + 1 == card1.rank)) -# /*********************************************************************** -# // The Familiar -# ************************************************************************/ +# ************************************************************************ +# * The Familiar +# ************************************************************************ class TheFamiliar(Game): Hint_Class = CautiousDefaultHint @@ -689,9 +689,9 @@ class TheFamiliar(Game): (card1.rank + 1 == card2.rank or card2.rank + 1 == card1.rank)) -# /*********************************************************************** -# // Two Familiars -# ************************************************************************/ +# ************************************************************************ +# * Two Familiars +# ************************************************************************ class TwoFamiliars(Game): Hint_Class = CautiousDefaultHint @@ -751,9 +751,9 @@ class TwoFamiliars(Game): (card1.rank + 1 == card2.rank or card2.rank + 1 == card1.rank)) -# /*********************************************************************** -# // Ten by Eight -# ************************************************************************/ +# ************************************************************************ +# * Ten by Eight +# ************************************************************************ class TenByEight(Game): Hint_Class = CautiousDefaultHint @@ -809,9 +809,9 @@ class TenByEight(Game): (card1.rank + 1 == card2.rank or card2.rank + 1 == card1.rank)) -# /*********************************************************************** -# // Drawbridge -# ************************************************************************/ +# ************************************************************************ +# * Drawbridge +# ************************************************************************ class Drawbridge(Game): Hint_Class = CautiousDefaultHint @@ -865,9 +865,9 @@ class Drawbridge(Game): (card1.rank + 1 == card2.rank or card2.rank + 1 == card1.rank)) -# /*********************************************************************** -# // Double Drawbridge -# ************************************************************************/ +# ************************************************************************ +# * Double Drawbridge +# ************************************************************************ class DoubleDrawbridge(Game): Hint_Class = CautiousDefaultHint @@ -921,9 +921,9 @@ class DoubleDrawbridge(Game): (card1.rank + 1 == card2.rank or card2.rank + 1 == card1.rank)) -# /*********************************************************************** -# // Hidden Passages -# ************************************************************************/ +# ************************************************************************ +# * Hidden Passages +# ************************************************************************ class HiddenPassages(Game): Hint_Class = CautiousDefaultHint @@ -990,9 +990,9 @@ class HiddenPassages(Game): (card1.rank + 1 == card2.rank or card2.rank + 1 == card1.rank)) -# /*********************************************************************** -# // Cluitjar's Lair -# ************************************************************************/ +# ************************************************************************ +# * Cluitjar's Lair +# ************************************************************************ class CluitjarsLair(Game): Hint_Class = CautiousDefaultHint @@ -1048,9 +1048,9 @@ class CluitjarsLair(Game): (card1.rank + 1 == card2.rank or card2.rank + 1 == card1.rank)) -# /*********************************************************************** -# // Merlin's Meander -# ************************************************************************/ +# ************************************************************************ +# * Merlin's Meander +# ************************************************************************ class MerlinsMeander(AbstractHexADeckGame): Hint_Class = Merlins_Hint @@ -1197,9 +1197,9 @@ class MerlinsMeander(AbstractHexADeckGame): return len(self.s.talon.cards) + len(self.s.waste.cards) == 0 -# /*********************************************************************** -# // Mage's Game -# ************************************************************************/ +# ************************************************************************ +# * Mage's Game +# ************************************************************************ class MagesGame(Game): Hint_Class = CautiousDefaultHint @@ -1254,9 +1254,9 @@ class MagesGame(Game): -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Convolution(AbstractHexADeckGame): RowStack_Class = StackWrapper(HexADeck_RK_RowStack, base_rank=NO_RANK) @@ -1340,9 +1340,9 @@ class Convolution(AbstractHexADeckGame): return (sequence([card1, card2]) or sequence([card2, card1])) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Labyrinth(Convolution): RowStack_Class = StackWrapper(HexADeck_AC_RowStack, base_rank=NO_RANK) @@ -1354,9 +1354,9 @@ class Labyrinth(Convolution): -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Snakestone(Convolution): RowStack_Class = StackWrapper(HexADeck_SS_RowStack, base_rank=NO_RANK) @@ -1368,9 +1368,9 @@ class Snakestone(Convolution): -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ def r(id, gameclass, name, game_type, decks, redeals, skill_level): game_type = game_type | GI.GT_HEXADECK diff --git a/pysollib/games/ultra/larasgame.py b/pysollib/games/ultra/larasgame.py index b68cb660..dc99bca0 100644 --- a/pysollib/games/ultra/larasgame.py +++ b/pysollib/games/ultra/larasgame.py @@ -36,9 +36,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.games.larasgame import LarasGame_Talon, LarasGame, LarasGame_Reserve -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class DojoujisGame_Talon(LarasGame_Talon): def getActiveRow(self): @@ -65,9 +65,9 @@ class BridgetsGame_Reserve(OpenStack): return self.game.app.images.getReserveBottom() -# /*********************************************************************** -# // Katrina's Game -# ************************************************************************/ +# ************************************************************************ +# * Katrina's Game +# ************************************************************************ class KatrinasGame(LarasGame): DEAL_TO_TALON = 3 @@ -102,18 +102,18 @@ class KatrinasGame(LarasGame): return self.app.images.getFace(deck, suit, rank) -# /*********************************************************************** -# // Relaxed Katrina's Game -# ************************************************************************/ +# ************************************************************************ +# * Relaxed Katrina's Game +# ************************************************************************ class RelaxedKatrinasGame(KatrinasGame): Reserve_Class = LarasGame_Reserve Reserve_Cards = 2 -# /*********************************************************************** -# // Double Katrina's Game -# ************************************************************************/ +# ************************************************************************ +# * Double Katrina's Game +# ************************************************************************ class DoubleKatrinasGame(RelaxedKatrinasGame): Reserve_Cards = 3 @@ -123,14 +123,14 @@ class DoubleKatrinasGame(RelaxedKatrinasGame): return 28 + 16 * (i == 4) -# /*********************************************************************** -# // Bridget's Game -# // In memory of Bridget Bishop -# // Hanged as a witch on June 10, 1692 -# // Salem Massachusetts, U. S. A. -# // and the nineteen other women -# // and men who followed her -# ************************************************************************/ +# ************************************************************************ +# * Bridget's Game +# * In memory of Bridget Bishop +# * Hanged as a witch on June 10, 1692 +# * Salem Massachusetts, U. S. A. +# * and the nineteen other women +# * and men who followed her +# ************************************************************************ class BridgetsGame(LarasGame): Reserve_Class = BridgetsGame_Reserve @@ -155,9 +155,9 @@ class BridgetsGame(LarasGame): return i -# /*********************************************************************** -# // Double Bridget's Game -# ************************************************************************/ +# ************************************************************************ +# * Double Bridget's Game +# ************************************************************************ class DoubleBridgetsGame(BridgetsGame): Reserve_Cards = 3 @@ -167,9 +167,9 @@ class DoubleBridgetsGame(BridgetsGame): return 32 - 24 * (i == 4) -# /*********************************************************************** -# // Fatimeh's Game -# ************************************************************************/ +# ************************************************************************ +# * Fatimeh's Game +# ************************************************************************ class FatimehsGame(LarasGame): DEAL_TO_TALON = 5 @@ -193,18 +193,18 @@ class FatimehsGame(LarasGame): return i + j * 4 -# /*********************************************************************** -# // Relaxed Fatimeh's Game -# ************************************************************************/ +# ************************************************************************ +# * Relaxed Fatimeh's Game +# ************************************************************************ class RelaxedFatimehsGame(FatimehsGame): Reserve_Class = LarasGame_Reserve Reserve_Cards = 2 -# /*********************************************************************** -# // Kali's Game -# ************************************************************************/ +# ************************************************************************ +# * Kali's Game +# ************************************************************************ class KalisGame(FatimehsGame): DEAL_TO_TALON = 6 @@ -214,18 +214,18 @@ class KalisGame(FatimehsGame): return i + j * 5 -# /*********************************************************************** -# // Relaxed Kali's Game -# ************************************************************************/ +# ************************************************************************ +# * Relaxed Kali's Game +# ************************************************************************ class RelaxedKalisGame(KalisGame): Reserve_Class = LarasGame_Reserve Reserve_Cards = 2 -# /*********************************************************************** -# // Double Kali's Game -# ************************************************************************/ +# ************************************************************************ +# * Double Kali's Game +# ************************************************************************ class DoubleKalisGame(RelaxedKalisGame): Talon_Class = DoubleKalisGame_Talon @@ -240,9 +240,9 @@ class DoubleKalisGame(RelaxedKalisGame): return 24 -# /*********************************************************************** -# // Dojouji's Game -# ************************************************************************/ +# ************************************************************************ +# * Dojouji's Game +# ************************************************************************ class DojoujisGame(LarasGame): Talon_Class = DojoujisGame_Talon @@ -266,9 +266,9 @@ class DojoujisGame(LarasGame): return i + j * 6 -# /*********************************************************************** -# // Double Dojouji's Game -# ************************************************************************/ +# ************************************************************************ +# * Double Dojouji's Game +# ************************************************************************ class DoubleDojoujisGame(DojoujisGame): MAX_ROW = 16 diff --git a/pysollib/games/ultra/matrix.py b/pysollib/games/ultra/matrix.py index 8e966f11..cba686c7 100644 --- a/pysollib/games/ultra/matrix.py +++ b/pysollib/games/ultra/matrix.py @@ -37,9 +37,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from pysollib.pysoltk import bind -# /*********************************************************************** -# // Matrix Row Stack -# ************************************************************************/ +# ************************************************************************ +# * Matrix Row Stack +# ************************************************************************ class Matrix_RowStack(OpenStack): @@ -118,9 +118,9 @@ class Matrix_RowStack(OpenStack): return 1 -# /*********************************************************************** -# // Matrix Game -# ************************************************************************/ +# ************************************************************************ +# * Matrix Game +# ************************************************************************ class Matrix3(Game): @@ -200,9 +200,9 @@ class Matrix3(Game): -# /*********************************************************************** -# // Size variations -# ************************************************************************/ +# ************************************************************************ +# * Size variations +# ************************************************************************ class Matrix4(Matrix3): pass @@ -229,9 +229,9 @@ class Matrix20(Matrix3): pass -# /*********************************************************************** -# // Register a Matrix game -# ************************************************************************/ +# ************************************************************************ +# * Register a Matrix game +# ************************************************************************ def r(id, gameclass, short_name): name = short_name diff --git a/pysollib/games/ultra/mughal.py b/pysollib/games/ultra/mughal.py index 04b518a4..563f6292 100644 --- a/pysollib/games/ultra/mughal.py +++ b/pysollib/games/ultra/mughal.py @@ -37,7 +37,7 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint, FreeCe from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** +# ************************************************************************ # * Mughal Foundation Stacks # ***********************************************************************/ @@ -73,7 +73,7 @@ class Triumph_Foundation(AbstractFoundationStack): -# /*********************************************************************** +# ************************************************************************ # * Mughal Row Stacks # ***********************************************************************/ @@ -240,7 +240,7 @@ class Triumph_ReserveStack(ReserveStack): -# /*********************************************************************** +# ************************************************************************ # * # ***********************************************************************/ @@ -268,7 +268,7 @@ class Triumph_Hint(DefaultHint): -# /*********************************************************************** +# ************************************************************************ # * Mughal Circles # ***********************************************************************/ @@ -349,7 +349,7 @@ class MughalCircles(AbstractMughalGame): -# /*********************************************************************** +# ************************************************************************ # * Eight Legions # ***********************************************************************/ @@ -415,7 +415,7 @@ class EightLegions(AbstractMughalGame): -# /*********************************************************************** +# ************************************************************************ # * Shamsher # ***********************************************************************/ @@ -470,7 +470,7 @@ class Shamsher(AbstractMughalGame): -# /*********************************************************************** +# ************************************************************************ # * Ashrafi # ***********************************************************************/ @@ -490,7 +490,7 @@ class Ashrafi(Shamsher): -# /*********************************************************************** +# ************************************************************************ # * Ghulam # ***********************************************************************/ @@ -515,7 +515,7 @@ class Ghulam(Shamsher): -# /*********************************************************************** +# ************************************************************************ # * Tipati # ***********************************************************************/ @@ -570,7 +570,7 @@ class Tipati(AbstractMughalGame): -# /*********************************************************************** +# ************************************************************************ # * Ashwapati # ***********************************************************************/ @@ -593,7 +593,7 @@ class Ashwapati(Tipati): -# /*********************************************************************** +# ************************************************************************ # * Gajapati # ***********************************************************************/ @@ -616,7 +616,7 @@ class Gajapati(Tipati): -# /*********************************************************************** +# ************************************************************************ # * Narpati # ***********************************************************************/ @@ -633,7 +633,7 @@ class Narpati(Tipati): -# /*********************************************************************** +# ************************************************************************ # * Garhpati # ***********************************************************************/ @@ -649,7 +649,7 @@ class Garhpati(Tipati): -# /*********************************************************************** +# ************************************************************************ # * Dhanpati # ***********************************************************************/ @@ -664,9 +664,9 @@ class Dhanpati(Tipati): -# /*********************************************************************** -# // Akbar's Triumph -# ************************************************************************/ +# ************************************************************************ +# * Akbar's Triumph +# ************************************************************************ class AkbarsTriumph(AbstractMughalGame): Hint_Class = Triumph_Hint @@ -803,9 +803,9 @@ class AkbarsTriumph(AbstractMughalGame): -# /*********************************************************************** -# // Akbar's Conquest -# ************************************************************************/ +# ************************************************************************ +# * Akbar's Conquest +# ************************************************************************ class AkbarsConquest(AkbarsTriumph): @@ -814,9 +814,9 @@ class AkbarsConquest(AkbarsTriumph): -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Vajra(AbstractMughalGame): RowStack_Class = StackWrapper(Mughal_RK_RowStack, base_rank=NO_RANK) @@ -900,9 +900,9 @@ class Vajra(AbstractMughalGame): return (sequence([card1, card2]) or sequence([card2, card1])) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Danda(Vajra): RowStack_Class = StackWrapper(Mughal_AF_RowStack, base_rank=NO_RANK) @@ -914,9 +914,9 @@ class Danda(Vajra): -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Khadga(Vajra): RowStack_Class = StackWrapper(Mughal_AC_RowStack, base_rank=NO_RANK) @@ -928,9 +928,9 @@ class Khadga(Vajra): -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Makara(Vajra): RowStack_Class = StackWrapper(Mughal_SS_RowStack, base_rank=NO_RANK) @@ -942,9 +942,9 @@ class Makara(Vajra): -# /*********************************************************************** -# // Ashta Dikapala Game Stacks -# ************************************************************************/ +# ************************************************************************ +# * Ashta Dikapala Game Stacks +# ************************************************************************ class Dikapala_TableauStack(Mughal_OpenStack): @@ -994,9 +994,9 @@ class Dikapala_RowStack(BasicRowStack): return self.game.app.images.getTalonBottom() -# /*********************************************************************** -# // Dikapala Hint -# ************************************************************************/ +# ************************************************************************ +# * Dikapala Hint +# ************************************************************************ class Dikapala_Hint(AbstractHint): def computeHints(self): @@ -1062,9 +1062,9 @@ class Dikapala_Hint(AbstractHint): self.addHint(self.SCORE_DEAL, 0, game.s.talon, None) -# /*********************************************************************** -# // Ashta Dikapala -# ************************************************************************/ +# ************************************************************************ +# * Ashta Dikapala +# ************************************************************************ class AshtaDikapala(Game): Hint_Class = Dikapala_Hint @@ -1138,9 +1138,9 @@ class AshtaDikapala(Game): return () -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ def r(id, gameclass, name, game_type, decks, redeals, skill_level): game_type = game_type | GI.GT_MUGHAL_GANJIFA diff --git a/pysollib/games/ultra/tarock.py b/pysollib/games/ultra/tarock.py index 681f07f7..c677f8f1 100644 --- a/pysollib/games/ultra/tarock.py +++ b/pysollib/games/ultra/tarock.py @@ -38,9 +38,9 @@ from pysollib.games.special.tarock import AbstractTarockGame, Grasshopper from pysollib.games.threepeaks import ThreePeaksNoScore -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Tarock_OpenStack(OpenStack): @@ -130,9 +130,9 @@ class Tarock_AC_RowStack(Tarock_OpenStack): return (self.basicCanMoveCards(cards) and self.isAlternateColorSequence(cards)) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Cockroach(Grasshopper): MAX_ROUNDS = 1 @@ -140,9 +140,9 @@ class Cockroach(Grasshopper): class DoubleCockroach(Grasshopper): MAX_ROUNDS = 1 -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Corkscrew(AbstractTarockGame): RowStack_Class = StackWrapper(Tarock_RK_RowStack, base_rank=NO_RANK) @@ -227,9 +227,9 @@ class Corkscrew(AbstractTarockGame): sequence = row.isRankSequence return (sequence([card1, card2]) or sequence([card2, card1])) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Serpent(Corkscrew): RowStack_Class = StackWrapper(Tarock_AC_RowStack, base_rank=NO_RANK) @@ -239,9 +239,9 @@ class Serpent(Corkscrew): sequence = row.isAlternateColorSequence return (sequence([card1, card2]) or sequence([card2, card1])) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Rambling(Corkscrew): RowStack_Class = StackWrapper(Tarock_SS_RowStack, base_rank=NO_RANK) @@ -251,18 +251,18 @@ class Rambling(Corkscrew): sequence = row.isSuitSequence return (sequence([card1, card2]) or sequence([card2, card1])) -# /*********************************************************************** -# // Le Grande Teton -# ************************************************************************/ +# ************************************************************************ +# * Le Grande Teton +# ************************************************************************ class LeGrandeTeton(ThreePeaksNoScore): pass -# /*********************************************************************** -# // register the games -# ************************************************************************/ +# ************************************************************************ +# * register the games +# ************************************************************************ def r(id, gameclass, name, game_type, decks, redeals, skill_level): game_type = game_type | GI.GT_TAROCK | GI.GT_CONTRIB | GI.GT_ORIGINAL diff --git a/pysollib/games/unionsquare.py b/pysollib/games/unionsquare.py index fe801680..e633b608 100644 --- a/pysollib/games/unionsquare.py +++ b/pysollib/games/unionsquare.py @@ -34,9 +34,9 @@ from pysollib.game import Game from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class UnionSquare_Foundation(AbstractFoundationStack): def acceptsCards(self, from_stack, cards): @@ -73,9 +73,9 @@ class UnionSquare_RowStack(OpenStack): getBottomImage = Stack._getReserveBottomImage -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class UnionSquare(Game): Hint_Class = CautiousDefaultHint @@ -135,9 +135,9 @@ class UnionSquare(Game): return () -# /*********************************************************************** -# // Solid Square -# ************************************************************************/ +# ************************************************************************ +# * Solid Square +# ************************************************************************ class SolidSquare(UnionSquare): RowStack_Class = StackWrapper(UD_SS_RowStack, base_rank=NO_RANK, @@ -165,9 +165,9 @@ class SolidSquare(UnionSquare): shallHighlightMatch = Game._shallHighlightMatch_SSW -# /*********************************************************************** -# // Boomerang -# ************************************************************************/ +# ************************************************************************ +# * Boomerang +# ************************************************************************ class Boomerang_Foundation(AbstractFoundationStack): def acceptsCards(self, from_stack, cards): diff --git a/pysollib/games/wavemotion.py b/pysollib/games/wavemotion.py index 27daf034..f2798059 100644 --- a/pysollib/games/wavemotion.py +++ b/pysollib/games/wavemotion.py @@ -36,9 +36,9 @@ from pysollib.layout import Layout from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint -# /*********************************************************************** -# // Wave Motion -# ************************************************************************/ +# ************************************************************************ +# * Wave Motion +# ************************************************************************ class WaveMotion(Game): RowStack_Class = SS_RowStack @@ -96,9 +96,9 @@ class WaveMotion(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Flourish -# ************************************************************************/ +# ************************************************************************ +# * Flourish +# ************************************************************************ class Flourish(WaveMotion): RowStack_Class = AC_RowStack diff --git a/pysollib/games/windmill.py b/pysollib/games/windmill.py index 3065ebef..9cb06305 100644 --- a/pysollib/games/windmill.py +++ b/pysollib/games/windmill.py @@ -37,9 +37,9 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint from golf import BlackHole_Foundation -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Windmill_Foundation(RK_FoundationStack): def getBottomImage(self): @@ -56,10 +56,10 @@ class Windmill_RowStack(ReserveStack): return from_stack is self.game.s.waste -# /*********************************************************************** -# // Windmill -# // Dutch Solitaire -# ************************************************************************/ +# ************************************************************************ +# * Windmill +# * Dutch Solitaire +# ************************************************************************ class Windmill(Game): @@ -190,9 +190,9 @@ class DutchSolitaire(Windmill): return (self.sg.dropstacks, self.sg.dropstacks, self.sg.dropstacks) -# /*********************************************************************** -# // Napoleon's Tomb -# ************************************************************************/ +# ************************************************************************ +# * Napoleon's Tomb +# ************************************************************************ class NapoleonsTomb(Windmill): @@ -247,9 +247,9 @@ class NapoleonsTomb(Windmill): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Corners -# ************************************************************************/ +# ************************************************************************ +# * Corners +# ************************************************************************ class Corners(Game): RowStack_Class = ReserveStack @@ -316,11 +316,11 @@ class Corners(Game): self.s.talon.dealCards() # deal first card to WasteStack -# /*********************************************************************** -# // Czarina -# // Four Seasons -# // Florentine Patience -# ************************************************************************/ +# ************************************************************************ +# * Czarina +# * Four Seasons +# * Florentine Patience +# ************************************************************************ class Czarina_RowStack(RK_RowStack): getBottomImage = Stack._getReserveBottomImage @@ -374,9 +374,9 @@ class FlorentinePatience(FourSeasons): Czarina.createGame(self, max_rounds=2) -# /*********************************************************************** -# // Simplicity -# ************************************************************************/ +# ************************************************************************ +# * Simplicity +# ************************************************************************ class Simplicity(Game): Hint_Class = CautiousDefaultHint diff --git a/pysollib/games/yukon.py b/pysollib/games/yukon.py index 9af22b48..e948f75f 100644 --- a/pysollib/games/yukon.py +++ b/pysollib/games/yukon.py @@ -41,9 +41,9 @@ from pysollib.pysoltk import MfxCanvasText from spider import Spider_SS_Foundation -# /*********************************************************************** -# // Yukon -# ************************************************************************/ +# ************************************************************************ +# * Yukon +# ************************************************************************ class Yukon(Game): Layout_Method = Layout.yukonLayout @@ -83,9 +83,9 @@ class Yukon(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Russian Solitaire (like Yukon, but build down by suit) -# ************************************************************************/ +# ************************************************************************ +# * Russian Solitaire (like Yukon, but build down by suit) +# ************************************************************************ class RussianSolitaire(Yukon): RowStack_Class = StackWrapper(Yukon_SS_RowStack, base_rank=KING) @@ -93,9 +93,9 @@ class RussianSolitaire(Yukon): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Moosehide (build down in any suit but the same) -# ************************************************************************/ +# ************************************************************************ +# * Moosehide (build down in any suit but the same) +# ************************************************************************ class Moosehide_RowStack(Yukon_AC_RowStack): def _isSequence(self, c1, c2): @@ -111,10 +111,10 @@ class Moosehide(Yukon): abs(card1.rank-card2.rank) == 1) -# /*********************************************************************** -# // Odessa (just like Russian Solitaire, only a different initial -# // card layout) -# ************************************************************************/ +# ************************************************************************ +# * Odessa (just like Russian Solitaire, only a different initial +# * card layout) +# ************************************************************************ class Odessa(RussianSolitaire): def startGame(self): @@ -128,9 +128,9 @@ class Odessa(RussianSolitaire): self.s.talon.dealRow() -# /*********************************************************************** -# // Grandfather -# ************************************************************************/ +# ************************************************************************ +# * Grandfather +# ************************************************************************ class Grandfather_Talon(RedealTalonStack): def dealCards(self, sound=False): @@ -162,9 +162,9 @@ class Grandfather(RussianSolitaire): redealCards = startGame -# /*********************************************************************** -# // Alaska (like Russian Solitaire, but build up or down in suit) -# ************************************************************************/ +# ************************************************************************ +# * Alaska (like Russian Solitaire, but build up or down in suit) +# ************************************************************************ class Alaska_RowStack(Yukon_SS_RowStack): def _isSequence(self, c1, c2): @@ -179,9 +179,9 @@ class Alaska(RussianSolitaire): RowStack_Class = StackWrapper(Alaska_RowStack, base_rank=KING) -# /*********************************************************************** -# // Roslin (like Yukon, but build up or down by alternate color) -# ************************************************************************/ +# ************************************************************************ +# * Roslin (like Yukon, but build up or down by alternate color) +# ************************************************************************ class Roslin_RowStack(Yukon_AC_RowStack): def _isSequence(self, c1, c2): @@ -196,10 +196,10 @@ class Roslin(Yukon): RowStack_Class = StackWrapper(Roslin_RowStack, base_rank=KING) -# /*********************************************************************** -# // Chinese Discipline -# // Chinese Solitaire -# ************************************************************************/ +# ************************************************************************ +# * Chinese Discipline +# * Chinese Solitaire +# ************************************************************************ class ChineseDiscipline(Yukon): Layout_Method = Layout.klondikeLayout @@ -220,9 +220,9 @@ class ChineseSolitaire(ChineseDiscipline): RowStack_Class = Yukon_AC_RowStack # anything on an empty space -# /*********************************************************************** -# // Queenie -# ************************************************************************/ +# ************************************************************************ +# * Queenie +# ************************************************************************ class Queenie(Yukon): Layout_Method = Layout.klondikeLayout @@ -238,9 +238,9 @@ class Queenie(Yukon): self.s.talon.dealRow(reverse=reverse) -# /*********************************************************************** -# // Rushdike (like Queenie, but built down by suit) -# ************************************************************************/ +# ************************************************************************ +# * Rushdike (like Queenie, but built down by suit) +# ************************************************************************ class Rushdike(RussianSolitaire): Layout_Method = Layout.klondikeLayout @@ -256,9 +256,9 @@ class Rushdike(RussianSolitaire): self.s.talon.dealRow(reverse=reverse) -# /*********************************************************************** -# // Russian Point (Rushdike in a different layout) -# ************************************************************************/ +# ************************************************************************ +# * Russian Point (Rushdike in a different layout) +# ************************************************************************ class RussianPoint(Rushdike): def startGame(self): @@ -269,9 +269,9 @@ class RussianPoint(Rushdike): self.s.talon.dealRow() -# /*********************************************************************** -# // Abacus -# ************************************************************************/ +# ************************************************************************ +# * Abacus +# ************************************************************************ class Abacus_Foundation(SS_FoundationStack): def __init__(self, x, y, game, suit, **cap): @@ -319,10 +319,10 @@ Diamond: 4 8 Q 3 7 J 2 6 T A 5 9 K''')) (card2.rank + dir) % mod == card1.rank)) -# /*********************************************************************** -# // Double Yukon -# // Double Russian Solitaire -# ************************************************************************/ +# ************************************************************************ +# * Double Yukon +# * Double Russian Solitaire +# ************************************************************************ class DoubleYukon(Yukon): def createGame(self): @@ -343,10 +343,10 @@ class DoubleRussianSolitaire(DoubleYukon): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Triple Yukon -# // Triple Russian Solitaire -# ************************************************************************/ +# ************************************************************************ +# * Triple Yukon +# * Triple Russian Solitaire +# ************************************************************************ class TripleYukon(Yukon): def createGame(self): @@ -366,9 +366,9 @@ class TripleRussianSolitaire(TripleYukon): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Ten Across -# ************************************************************************/ +# ************************************************************************ +# * Ten Across +# ************************************************************************ class TenAcross(Yukon): @@ -415,9 +415,9 @@ class TenAcross(Yukon): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Panopticon -# ************************************************************************/ +# ************************************************************************ +# * Panopticon +# ************************************************************************ class Panopticon(TenAcross): @@ -440,11 +440,11 @@ class Panopticon(TenAcross): self.s.talon.dealRow(rows=self.s.reserves) -# /*********************************************************************** -# // Australian Patience -# // Raw Prawn -# // Bim Bom -# ************************************************************************/ +# ************************************************************************ +# * Australian Patience +# * Raw Prawn +# * Bim Bom +# ************************************************************************ class AustralianPatience(RussianSolitaire): @@ -486,9 +486,9 @@ class BimBom(AustralianPatience): self.s.talon.dealCards() -# /*********************************************************************** -# // Geoffrey -# ************************************************************************/ +# ************************************************************************ +# * Geoffrey +# ************************************************************************ class Geoffrey(Yukon): Layout_Method = Layout.klondikeLayout @@ -508,9 +508,9 @@ class Geoffrey(Yukon): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Queensland -# ************************************************************************/ +# ************************************************************************ +# * Queensland +# ************************************************************************ class Queensland(Yukon): Layout_Method = Layout.klondikeLayout @@ -531,9 +531,9 @@ class Queensland(Yukon): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Outback Patience -# ************************************************************************/ +# ************************************************************************ +# * Outback Patience +# ************************************************************************ class OutbackPatience(Yukon): @@ -561,10 +561,10 @@ class OutbackPatience(Yukon): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Russian Spider -# // Double Russian Spider -# ************************************************************************/ +# ************************************************************************ +# * Russian Spider +# * Double Russian Spider +# ************************************************************************ class RussianSpider_RowStack(Yukon_SS_RowStack): #Spider_SS_RowStack def canDropCards(self, stacks): @@ -605,9 +605,9 @@ class DoubleRussianSpider(RussianSpider, DoubleRussianSolitaire): DoubleRussianSolitaire.startGame(self) -# /*********************************************************************** -# // Brisbane -# ************************************************************************/ +# ************************************************************************ +# * Brisbane +# ************************************************************************ class Brisbane_RowStack(Yukon_AC_RowStack): def _isSequence(self, c1, c2): @@ -634,9 +634,9 @@ class Brisbane(Yukon): shallHighlightMatch = Game._shallHighlightMatch_RK -# /*********************************************************************** -# // Hawaiian -# ************************************************************************/ +# ************************************************************************ +# * Hawaiian +# ************************************************************************ class Hawaiian(Game): Hint_Class = Yukon_Hint @@ -676,9 +676,9 @@ class Hawaiian(Game): shallHighlightMatch = Game._shallHighlightMatch_AC -# /*********************************************************************** -# // Wave -# ************************************************************************/ +# ************************************************************************ +# * Wave +# ************************************************************************ class WaveTalon(DealRowTalonStack): def dealCards(self, sound=False): diff --git a/pysollib/games/zodiac.py b/pysollib/games/zodiac.py index 73aef51d..e71ef25e 100644 --- a/pysollib/games/zodiac.py +++ b/pysollib/games/zodiac.py @@ -38,9 +38,9 @@ from pysollib.pysoltk import MfxCanvasText -# /*********************************************************************** -# // Zodiac -# ************************************************************************/ +# ************************************************************************ +# * Zodiac +# ************************************************************************ class Zodiac_Foundation(SS_FoundationStack): def acceptsCards(self, from_stack, cards): @@ -125,9 +125,9 @@ class Zodiac(Game): shallHighlightMatch = Game._shallHighlightMatch_SS -# /*********************************************************************** -# // Twelve Sleeping Maids -# ************************************************************************/ +# ************************************************************************ +# * Twelve Sleeping Maids +# ************************************************************************ class TwelveSleepingMaids_Reserve(OpenStack): def canFlipCard(self): diff --git a/pysollib/help.py b/pysollib/help.py index 13a3dbf9..2e7c11d6 100644 --- a/pysollib/help.py +++ b/pysollib/help.py @@ -32,9 +32,9 @@ from pysoltk import PysolAboutDialog from pysoltk import HTMLViewer -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ def help_about(app, timeout=0, sound=True): if sound: @@ -94,9 +94,9 @@ for making this program possible''') % t, return d.status -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ help_html_viewer = None help_html_index = None diff --git a/pysollib/hint.py b/pysollib/hint.py index 22868272..57c7632a 100644 --- a/pysollib/hint.py +++ b/pysollib/hint.py @@ -33,13 +33,13 @@ from mfxutil import destruct from util import KING -# /*********************************************************************** -# // HintInterface is an abstract class that defines the public -# // interface - it only consists of the constructor -# // and the getHints() method. -# // -# // The whole hint system is exclusively used by Game.getHints(). -# ************************************************************************/ +# ************************************************************************ +# * HintInterface is an abstract class that defines the public +# * interface - it only consists of the constructor +# * and the getHints() method. +# * +# * The whole hint system is exclusively used by Game.getHints(). +# ************************************************************************ class HintInterface: # level == 0: show hint (key `H') @@ -69,11 +69,11 @@ class HintInterface: return [] -# /*********************************************************************** -# // AbstractHint provides a useful framework for derived hint classes. -# // -# // Subclasses should override computeHints() -# ************************************************************************/ +# ************************************************************************ +# * AbstractHint provides a useful framework for derived hint classes. +# * +# * Subclasses should override computeHints() +# ************************************************************************ class AbstractHint(HintInterface): def __init__(self, game, level): @@ -266,9 +266,9 @@ class AbstractHint(HintInterface): BLUE = "blue" -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class DefaultHint(AbstractHint): @@ -636,9 +636,9 @@ class DefaultHint(AbstractHint): ### FIXME -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class CautiousDefaultHint(DefaultHint): shallMovePile = DefaultHint._cautiousShallMovePile @@ -648,9 +648,9 @@ class CautiousDefaultHint(DefaultHint): return 1 -# /*********************************************************************** -# // now some default hints for the various game types -# ************************************************************************/ +# ************************************************************************ +# * now some default hints for the various game types +# ************************************************************************ # DefaultHint is optimized for Klondike type games anyway class KlondikeType_Hint(DefaultHint): @@ -704,9 +704,9 @@ class SpiderType_Hint(DefaultHint): -# /*********************************************************************** -# // FreeCell-Solver -# ************************************************************************/ +# ************************************************************************ +# * FreeCell-Solver +# ************************************************************************ class FreeCellSolver_Hint: diff --git a/pysollib/images.py b/pysollib/images.py index ee95ab44..b89f5d8a 100644 --- a/pysollib/images.py +++ b/pysollib/images.py @@ -33,9 +33,9 @@ from mfxutil import Image, ImageTk from pysoltk import loadImage, copyImage, createImage, shadowImage -# /*********************************************************************** -# // Images -# ************************************************************************/ +# ************************************************************************ +# * Images +# ************************************************************************ class ImagesCardback: @@ -396,9 +396,9 @@ class Images: self._letter = self._letter_positive -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class SubsampledImages(Images): def __init__(self, images, r=2): diff --git a/pysollib/init.py b/pysollib/init.py index 98a85e2d..a4904afc 100644 --- a/pysollib/init.py +++ b/pysollib/init.py @@ -27,9 +27,9 @@ import gettext import settings -# /*********************************************************************** -# // init -# ************************************************************************/ +# ************************************************************************ +# * init +# ************************************************************************ def fix_gettext(): def ugettext(message): diff --git a/pysollib/layout.py b/pysollib/layout.py index a5f2ff14..6984249d 100644 --- a/pysollib/layout.py +++ b/pysollib/layout.py @@ -30,9 +30,9 @@ from pysoltk import MfxCanvasText from resource import CSI -# /*********************************************************************** -# // a helper class to create common layouts -# ************************************************************************/ +# ************************************************************************ +# * a helper class to create common layouts +# ************************************************************************ # a layout stack class _LayoutStack: diff --git a/pysollib/main.py b/pysollib/main.py index e0e8df42..a6ff9dd0 100644 --- a/pysollib/main.py +++ b/pysollib/main.py @@ -45,9 +45,9 @@ from pysoltk import MfxRoot from pysoltk import PysolProgressBar -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ def fatal_no_cardsets(app): app.wm_withdraw() @@ -62,9 +62,9 @@ Please check your %s installation. bitmap="error", strings=(_("&Quit"),)) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ def parse_option(argv): prog_name = argv[0] @@ -133,9 +133,9 @@ def parse_option(argv): return None return opts, filename -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ def pysol_init(app, args): @@ -348,9 +348,9 @@ Please check your %s installation. return 0 -# /*********************************************************************** -# // main -# ************************************************************************/ +# ************************************************************************ +# * main +# ************************************************************************ def main(args=None): # create the application diff --git a/pysollib/mfxutil.py b/pysollib/mfxutil.py index 203474af..13d3a006 100644 --- a/pysollib/mfxutil.py +++ b/pysollib/mfxutil.py @@ -56,17 +56,17 @@ if TOOLKIT == 'tk': Image._initialized = 2 -# /*********************************************************************** -# // exceptions -# ************************************************************************/ +# ************************************************************************ +# * exceptions +# ************************************************************************ class SubclassResponsibility(Exception): pass -# /*********************************************************************** -# // misc. util -# ************************************************************************/ +# ************************************************************************ +# * misc. util +# ************************************************************************ def latin1_to_ascii(n): @@ -100,9 +100,9 @@ def print_err(s, level=1): sys.stderr.flush() -# /*********************************************************************** -# // misc. portab stuff -# ************************************************************************/ +# ************************************************************************ +# * misc. portab stuff +# ************************************************************************ def getusername(): if os.name == "nt": @@ -128,9 +128,9 @@ usleep = time.sleep if os.name == "posix": uclock = time.time -# /*********************************************************************** -# // MSWin util -# ************************************************************************/ +# ************************************************************************ +# * MSWin util +# ************************************************************************ def win32_getusername(): user = os.environ.get('USERNAME','').strip() @@ -148,9 +148,9 @@ def win32_getprefdir(package): return os.path.join(hd, 'PySolFC') -# /*********************************************************************** -# // memory util -# ************************************************************************/ +# ************************************************************************ +# * memory util +# ************************************************************************ def destruct(obj): # assist in breaking circular references @@ -161,9 +161,9 @@ def destruct(obj): ##del obj.__dict__[k] -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Struct: def __init__(self, **kw): @@ -206,9 +206,9 @@ class Struct: return c -# /*********************************************************************** -# // keyword argument util -# ************************************************************************/ +# ************************************************************************ +# * keyword argument util +# ************************************************************************ # update keyword arguments with default arguments def kwdefault(kw, **defaults): @@ -245,9 +245,9 @@ class KwStruct: return self.__dict__ -# /*********************************************************************** -# // pickling support -# ************************************************************************/ +# ************************************************************************ +# * pickling support +# ************************************************************************ def pickle(obj, filename, protocol=0): f = None @@ -275,9 +275,9 @@ def unpickle(filename): return obj -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ def openURL(url): try: diff --git a/pysollib/move.py b/pysollib/move.py index bb230e76..0fb842f6 100644 --- a/pysollib/move.py +++ b/pysollib/move.py @@ -25,9 +25,9 @@ # imports -# /*********************************************************************** -# // moves (undo / redo) -# ************************************************************************/ +# ************************************************************************ +# * moves (undo / redo) +# ************************************************************************ ## Currently we have the following atomic moves: ## - move the top cards from one stack on the top of another @@ -53,9 +53,9 @@ class AtomicMove: return -1 -# /*********************************************************************** -# // Move the top N cards from a stack to another stack. -# ************************************************************************/ +# ************************************************************************ +# * Move the top N cards from a stack to another stack. +# ************************************************************************ class AMoveMove(AtomicMove): def __init__(self, ncards, from_stack, to_stack, frames, shadow=-1): @@ -101,9 +101,9 @@ class AMoveMove(AtomicMove): cmp(self.to_stack_id, other.to_stack_id)) -# /*********************************************************************** -# // Flip the top card of a stack. -# ************************************************************************/ +# ************************************************************************ +# * Flip the top card of a stack. +# ************************************************************************ class AFlipMove(AtomicMove): def __init__(self, stack): @@ -179,9 +179,9 @@ class AFlipAndMoveMove(AtomicMove): cmp(self.to_stack_id, other.to_stack_id)) -# /*********************************************************************** -# // Flip all cards -# ************************************************************************/ +# ************************************************************************ +# * Flip all cards +# ************************************************************************ class AFlipAllMove(AtomicMove): def __init__(self, stack): @@ -209,9 +209,9 @@ class AFlipAllMove(AtomicMove): return cmp(self.stack_id, other.stack_id) -# /*********************************************************************** -# // Turn the Waste stack onto the empty Talon. -# ************************************************************************/ +# ************************************************************************ +# * Turn the Waste stack onto the empty Talon. +# ************************************************************************ class ATurnStackMove(AtomicMove): def __init__(self, from_stack, to_stack): @@ -259,11 +259,11 @@ class ATurnStackMove(AtomicMove): cmp(self.to_stack_id, other.to_stack_id)) -# /*********************************************************************** -# // ATurnStackMove is somewhat optimized to avoid unnecessary -# // unhide and hide operations. -# // FIXME: doesn't work yet -# ************************************************************************/ +# ************************************************************************ +# * ATurnStackMove is somewhat optimized to avoid unnecessary +# * unhide and hide operations. +# * FIXME: doesn't work yet +# ************************************************************************ class NEW_ATurnStackMove(AtomicMove): def __init__(self, from_stack, to_stack, update_flags=1): @@ -316,10 +316,10 @@ class NEW_ATurnStackMove(AtomicMove): cmp(self.update_flags, other.update_flags)) -# /*********************************************************************** -# // Update the view or model of a stack. Only needed for complex -# // games in combination with undo. -# ************************************************************************/ +# ************************************************************************ +# * Update the view or model of a stack. Only needed for complex +# * games in combination with undo. +# ************************************************************************ class AUpdateStackMove(AtomicMove): def __init__(self, stack, flags): @@ -354,9 +354,9 @@ AUpdateStackModelMove = AUpdateStackMove AUpdateStackViewMove = AUpdateStackMove -# /*********************************************************************** -# // Increase the `round' member variable of a Talon stack. -# ************************************************************************/ +# ************************************************************************ +# * Increase the `round' member variable of a Talon stack. +# ************************************************************************ class ANextRoundMove(AtomicMove): def __init__(self, stack): @@ -380,9 +380,9 @@ class ANextRoundMove(AtomicMove): return cmp(self.stack_id, other.stack_id) -# /*********************************************************************** -# // Save the current state (needed for undo in some games). -# ************************************************************************/ +# ************************************************************************ +# * Save the current state (needed for undo in some games). +# ************************************************************************ class ASaveSeedMove(AtomicMove): def __init__(self, game): @@ -398,9 +398,9 @@ class ASaveSeedMove(AtomicMove): return cmp(self.state, other.state) -# /*********************************************************************** -# // Save game variables -# ************************************************************************/ +# ************************************************************************ +# * Save game variables +# ************************************************************************ class ASaveStateMove(AtomicMove): def __init__(self, game, flags): @@ -419,9 +419,9 @@ class ASaveStateMove(AtomicMove): return cmp(self.state, other.state) -# /*********************************************************************** -# // Shuffle all cards of a stack. Saves the seed. Does not flip any cards. -# ************************************************************************/ +# ************************************************************************ +# * Shuffle all cards of a stack. Saves the seed. Does not flip any cards. +# ************************************************************************ class AShuffleStackMove(AtomicMove): def __init__(self, stack, game): @@ -463,10 +463,10 @@ class AShuffleStackMove(AtomicMove): cmp(self.state, other.state)) -# /*********************************************************************** -# // ASingleCardMove - move single card from *anyone* position -# // (for ArbitraryStack) -# ************************************************************************/ +# ************************************************************************ +# * ASingleCardMove - move single card from *anyone* position +# * (for ArbitraryStack) +# ************************************************************************ class ASingleCardMove(AtomicMove): @@ -509,9 +509,9 @@ class ASingleCardMove(AtomicMove): (other.from_stack_id, other.to_stack_id, other.from_pos)) -# /*********************************************************************** -# // AInnerMove - change position of single card in stack (TODO) -# ************************************************************************/ +# ************************************************************************ +# * AInnerMove - change position of single card in stack (TODO) +# ************************************************************************ class AInnerMove(AtomicMove): diff --git a/pysollib/options.py b/pysollib/options.py index f4e4d225..6ff7e8f0 100644 --- a/pysollib/options.py +++ b/pysollib/options.py @@ -35,9 +35,9 @@ import settings from pysoltk import TOOLBAR_BUTTONS -# /*********************************************************************** -# // Options -# ************************************************************************/ +# ************************************************************************ +# * Options +# ************************************************************************ configspec = ''' diff --git a/pysollib/pysolaudio.py b/pysollib/pysolaudio.py index c5cf7560..2a83332b 100644 --- a/pysollib/pysolaudio.py +++ b/pysollib/pysolaudio.py @@ -38,9 +38,9 @@ except ImportError: pysolsoundserver = None -# /*********************************************************************** -# // basic audio client -# ************************************************************************/ +# ************************************************************************ +# * basic audio client +# ************************************************************************ class AbstractAudioClient: @@ -165,9 +165,9 @@ class AbstractAudioClient: pass -# /*********************************************************************** -# // pysolsoundserver module -# ************************************************************************/ +# ************************************************************************ +# * pysolsoundserver module +# ************************************************************************ class PysolSoundServerModuleClient(AbstractAudioClient): @@ -252,9 +252,9 @@ class PysolSoundServerModuleClient(AbstractAudioClient): if traceback: traceback.print_exc() -# /*********************************************************************** -# // Win32 winsound audio -# ************************************************************************/ +# ************************************************************************ +# * Win32 winsound audio +# ************************************************************************ class Win32AudioClient(AbstractAudioClient): @@ -289,9 +289,9 @@ class Win32AudioClient(AbstractAudioClient): a.PlaySound(None, flags) -# /*********************************************************************** -# // OSS audio -# ************************************************************************/ +# ************************************************************************ +# * OSS audio +# ************************************************************************ class OSSAudioServer: @@ -400,9 +400,9 @@ class OSSAudioClient(AbstractAudioClient): os.write(self.pout, '\0\0\0') -# /*********************************************************************** -# // PyGame -# ************************************************************************/ +# ************************************************************************ +# * PyGame +# ************************************************************************ class PyGameAudioClient(AbstractAudioClient): diff --git a/pysollib/pysolgtk/card.py b/pysollib/pysolgtk/card.py index 39333461..53cd87fa 100644 --- a/pysollib/pysolgtk/card.py +++ b/pysollib/pysolgtk/card.py @@ -32,9 +32,9 @@ from pysollib.acard import AbstractCard from tkcanvas import MfxCanvasGroup, MfxCanvasImage -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class _HideableCard(AbstractCard): def hide(self, stack): @@ -51,9 +51,9 @@ class _HideableCard(AbstractCard): return 1 -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class _OneImageCard(_HideableCard): def __init__(self, id, deck, suit, rank, game, x=0, y=0): @@ -89,9 +89,9 @@ class _OneImageCard(_HideableCard): self.__image.config(image=image) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class _TwoImageCard(_HideableCard): def __init__(self, id, deck, suit, rank, game, x=0, y=0): diff --git a/pysollib/pysolgtk/colorsdialog.py b/pysollib/pysolgtk/colorsdialog.py index c772f6d7..d869c3fb 100644 --- a/pysollib/pysolgtk/colorsdialog.py +++ b/pysollib/pysolgtk/colorsdialog.py @@ -30,9 +30,9 @@ import gtk.glade from gtk import gdk -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class ColorsDialog: diff --git a/pysollib/pysolgtk/edittextdialog.py b/pysollib/pysolgtk/edittextdialog.py index 02b15fea..e64ce29f 100644 --- a/pysollib/pysolgtk/edittextdialog.py +++ b/pysollib/pysolgtk/edittextdialog.py @@ -31,9 +31,9 @@ __all__ = ['EditTextDialog'] # Toolkit imports from tkwidget import MfxDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class EditTextDialog(MfxDialog): pass diff --git a/pysollib/pysolgtk/findcarddialog.py b/pysollib/pysolgtk/findcarddialog.py index 42babea9..4d76a036 100644 --- a/pysollib/pysolgtk/findcarddialog.py +++ b/pysollib/pysolgtk/findcarddialog.py @@ -39,9 +39,9 @@ __all__ = ['create_find_card_dialog', ## from tkcanvas import MfxCanvas, MfxCanvasGroup, MfxCanvasImage, MfxCanvasRectangle -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ find_card_dialog = None diff --git a/pysollib/pysolgtk/fontsdialog.py b/pysollib/pysolgtk/fontsdialog.py index f12d052e..934ff887 100644 --- a/pysollib/pysolgtk/fontsdialog.py +++ b/pysollib/pysolgtk/fontsdialog.py @@ -33,9 +33,9 @@ import gtk.glade from tkutil import create_pango_font_desc -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class FontsDialog: diff --git a/pysollib/pysolgtk/gameinfodialog.py b/pysollib/pysolgtk/gameinfodialog.py index 27f0c2a8..20a5c36f 100644 --- a/pysollib/pysolgtk/gameinfodialog.py +++ b/pysollib/pysolgtk/gameinfodialog.py @@ -35,9 +35,9 @@ __all__ = ['GameInfoDialog'] # Toolkit imports from tkwidget import MfxDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class GameInfoDialog(MfxDialog): pass diff --git a/pysollib/pysolgtk/menubar.py b/pysollib/pysolgtk/menubar.py index 23062106..0112dcf3 100644 --- a/pysollib/pysolgtk/menubar.py +++ b/pysollib/pysolgtk/menubar.py @@ -46,11 +46,11 @@ def ltk2gtk(s): return _(s).replace('&', '_') -# /*********************************************************************** -# // - create menubar -# // - update menubar -# // - menu actions -# ************************************************************************/ +# ************************************************************************ +# * - create menubar +# * - update menubar +# * - menu actions +# ************************************************************************ class PysolMenubarTk: def __init__(self, app, top, progress=None): diff --git a/pysollib/pysolgtk/playeroptionsdialog.py b/pysollib/pysolgtk/playeroptionsdialog.py index 187a488d..6012fb72 100644 --- a/pysollib/pysolgtk/playeroptionsdialog.py +++ b/pysollib/pysolgtk/playeroptionsdialog.py @@ -33,9 +33,9 @@ from tkwidget import MfxDialog from pysollib.mfxutil import kwdefault -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class PlayerOptionsDialog(MfxDialog): def __init__(self, parent, title, app, **kw): diff --git a/pysollib/pysolgtk/progressbar.py b/pysollib/pysolgtk/progressbar.py index b55e0d41..e151ec3f 100644 --- a/pysollib/pysolgtk/progressbar.py +++ b/pysollib/pysolgtk/progressbar.py @@ -32,9 +32,9 @@ from gtk import gdk from tkutil import makeToplevel, setTransient -# /*********************************************************************** -# // a simple progress bar -# ************************************************************************/ +# ************************************************************************ +# * a simple progress bar +# ************************************************************************ class PysolProgressBar: def __init__(self, app, parent, title=None, images=None, @@ -130,9 +130,9 @@ class PysolProgressBar: return True -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ #%ifndef BUNDLE diff --git a/pysollib/pysolgtk/pysoltree.py b/pysollib/pysolgtk/pysoltree.py index 2f3d465a..6f89462f 100644 --- a/pysollib/pysolgtk/pysoltree.py +++ b/pysollib/pysolgtk/pysoltree.py @@ -31,9 +31,9 @@ import gtk, gobject # Toolkit imports -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class PysolTreeView: diff --git a/pysollib/pysolgtk/selectcardset.py b/pysollib/pysolgtk/selectcardset.py index dfcccf18..906e1f52 100644 --- a/pysollib/pysolgtk/selectcardset.py +++ b/pysollib/pysolgtk/selectcardset.py @@ -37,9 +37,9 @@ from tkcanvas import MfxCanvas, MfxCanvasImage from tkutil import loadImage -# /*********************************************************************** -# // Dialog -# ************************************************************************/ +# ************************************************************************ +# * Dialog +# ************************************************************************ class SelectCardsetDialogWithPreview(MfxDialog): _cardset_store = None diff --git a/pysollib/pysolgtk/selectgame.py b/pysollib/pysolgtk/selectgame.py index 78f405f6..9c0d9e36 100644 --- a/pysollib/pysolgtk/selectgame.py +++ b/pysollib/pysolgtk/selectgame.py @@ -43,9 +43,9 @@ from tkcanvas import MfxCanvas, MfxCanvasText from pysoltree import PysolTreeView -# /*********************************************************************** -# // Dialog -# ************************************************************************/ +# ************************************************************************ +# * Dialog +# ************************************************************************ class SelectGameDialogWithPreview(MfxDialog): #Tree_Class = SelectGameTreeWithPreview diff --git a/pysollib/pysolgtk/soundoptionsdialog.py b/pysollib/pysolgtk/soundoptionsdialog.py index a61b23b8..7e09b1ff 100644 --- a/pysollib/pysolgtk/soundoptionsdialog.py +++ b/pysollib/pysolgtk/soundoptionsdialog.py @@ -33,9 +33,9 @@ from gtk import glade from tkwidget import MfxDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class SoundOptionsDialog: def __init__(self, parent, title, app, **kw): diff --git a/pysollib/pysolgtk/statusbar.py b/pysollib/pysolgtk/statusbar.py index 34136fd4..c3333ee3 100644 --- a/pysollib/pysolgtk/statusbar.py +++ b/pysollib/pysolgtk/statusbar.py @@ -29,9 +29,9 @@ import gtk # PySol imports -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class BasicStatusbar: def __init__(self, top, row, column, columnspan): @@ -96,9 +96,9 @@ class BasicStatusbar: pass -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class PysolStatusbar(BasicStatusbar): def __init__(self, top): BasicStatusbar.__init__(self, top, row=4, column=0, columnspan=3) diff --git a/pysollib/pysolgtk/timeoutsdialog.py b/pysollib/pysolgtk/timeoutsdialog.py index 0aeb2791..ab7f2e3c 100644 --- a/pysollib/pysolgtk/timeoutsdialog.py +++ b/pysollib/pysolgtk/timeoutsdialog.py @@ -29,9 +29,9 @@ import gtk, gobject, pango import gtk.glade -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class TimeoutsDialog: diff --git a/pysollib/pysolgtk/tkcanvas.py b/pysollib/pysolgtk/tkcanvas.py index 7af354d2..92542ad4 100644 --- a/pysollib/pysolgtk/tkcanvas.py +++ b/pysollib/pysolgtk/tkcanvas.py @@ -54,15 +54,15 @@ except ImportError: from tkutil import anchor_tk2gtk, loadImage, bind, create_pango_font_desc -# /*********************************************************************** -# // canvas items -# // -# // My first (obvious) approach was to subclass the GnomeCanvas* -# // classes, but this didn't work at all... -# // -# // Now I've resorted to delegation, but what are the Gnome canvas item -# // classes for then ? -# ************************************************************************/ +# ************************************************************************ +# * canvas items +# * +# * My first (obvious) approach was to subclass the GnomeCanvas* +# * classes, but this didn't work at all... +# * +# * Now I've resorted to delegation, but what are the Gnome canvas item +# * classes for then ? +# ************************************************************************ class _CanvasItem: @@ -271,9 +271,9 @@ class MfxCanvasText(_CanvasItem): cget = __getitem__ -# /*********************************************************************** -# // canvas -# ************************************************************************/ +# ************************************************************************ +# * canvas +# ************************************************************************ class MfxCanvas(gnomecanvas.Canvas): def __init__(self, top, bg=None, highlightthickness=0): diff --git a/pysollib/pysolgtk/tkconst.py b/pysollib/pysolgtk/tkconst.py index 313cf629..2f57d622 100644 --- a/pysollib/pysolgtk/tkconst.py +++ b/pysollib/pysolgtk/tkconst.py @@ -30,9 +30,9 @@ from gtk import gdk from gtk import ANCHOR_NW, ANCHOR_SW, ANCHOR_NE, ANCHOR_SE -# /*********************************************************************** -# // constants -# ************************************************************************/ +# ************************************************************************ +# * constants +# ************************************************************************ EVENT_HANDLED = 1 EVENT_PROPAGATE = 0 diff --git a/pysollib/pysolgtk/tkhtml.py b/pysollib/pysolgtk/tkhtml.py index cad465ab..b93777aa 100644 --- a/pysollib/pysolgtk/tkhtml.py +++ b/pysollib/pysolgtk/tkhtml.py @@ -49,9 +49,9 @@ from tkwidget import MfxMessageDialog REMOTE_PROTOCOLS = ('ftp:', 'gopher:', 'http:', 'mailto:', 'news:', 'telnet:') -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class tkHTMLWriter(formatter.NullWriter): def __init__(self, text, viewer, app): @@ -158,9 +158,9 @@ class tkHTMLWriter(formatter.NullWriter): self.write(data) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class tkHTMLParser(htmllib.HTMLParser): def anchor_bgn(self, href, name, type): @@ -181,9 +181,9 @@ class tkHTMLParser(htmllib.HTMLParser): self.formatter.writer.viewer.showImage(src, alt, ismap, align, width, height) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class HTMLViewer: symbols_fn = {} # filenames, loaded in Application.loadImages3 @@ -555,9 +555,9 @@ to open the following URL: -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ def tkhtml_main(args): diff --git a/pysollib/pysolgtk/tkstats.py b/pysollib/pysolgtk/tkstats.py index 403a3b93..afb67ff0 100644 --- a/pysollib/pysolgtk/tkstats.py +++ b/pysollib/pysolgtk/tkstats.py @@ -36,9 +36,9 @@ from pysollib.stats import PysolStatsFormatter from tkwidget import MfxDialog, MfxMessageDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class StatsFormatter(PysolStatsFormatter): @@ -508,9 +508,9 @@ class Game_StatsDialog: return cmp(float(val1), float(val2)) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ SingleGame_StatsDialog = Game_StatsDialog AllGames_StatsDialog = Game_StatsDialog @@ -519,9 +519,9 @@ SessionLog_StatsDialog = Game_StatsDialog Top_StatsDialog = Game_StatsDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Status_StatsDialog(MfxMessageDialog): #MfxDialog def __init__(self, parent, game): diff --git a/pysollib/pysolgtk/tkutil.py b/pysollib/pysolgtk/tkutil.py index 97bf55ae..978b26bd 100644 --- a/pysollib/pysolgtk/tkutil.py +++ b/pysollib/pysolgtk/tkutil.py @@ -30,9 +30,9 @@ import pango, gtk from gtk import gdk -# /*********************************************************************** -# // window util -# ************************************************************************/ +# ************************************************************************ +# * window util +# ************************************************************************ def wm_withdraw(window): window.hide() @@ -69,9 +69,9 @@ def setTransient(window, parent, relx=0.5, rely=0.3, expose=1): pass -# /*********************************************************************** -# // conversion util -# ************************************************************************/ +# ************************************************************************ +# * conversion util +# ************************************************************************ def anchor_tk2gtk(anchor): if isinstance(anchor, int): @@ -97,9 +97,9 @@ def color_gtk2tk(col): return "#%02x%02x%02x" % (r, g, b) -# /*********************************************************************** -# // image util -# ************************************************************************/ +# ************************************************************************ +# * image util +# ************************************************************************ class _PysolPixmap: @@ -162,10 +162,10 @@ def markImage(image): return image -# /*********************************************************************** -# // event wrapper -# // this really sucks, need something better... -# ************************************************************************/ +# ************************************************************************ +# * event wrapper +# * this really sucks, need something better... +# ************************************************************************ def _wrap_b1_press(e): return (e.type == gdk.BUTTON_PRESS and e.button == 1 and @@ -265,9 +265,9 @@ def unbind_destroy(widget): del __bindings[k] -# /*********************************************************************** -# // timer wrapper -# ************************************************************************/ +# ************************************************************************ +# * timer wrapper +# ************************************************************************ def after(widget, ms, func, *args): timer = gobject.timeout_add(ms, func, *args) @@ -282,9 +282,9 @@ def after_cancel(t): gobject.source_remove(t) -# /*********************************************************************** -# // font -# ************************************************************************/ +# ************************************************************************ +# * font +# ************************************************************************ def create_pango_font_desc(font): font_desc = pango.FontDescription(font[0]+' '+str(font[1])) diff --git a/pysollib/pysolgtk/tkwidget.py b/pysollib/pysolgtk/tkwidget.py index 7575d238..f474b7e5 100644 --- a/pysollib/pysolgtk/tkwidget.py +++ b/pysollib/pysolgtk/tkwidget.py @@ -36,9 +36,9 @@ from tkutil import makeToplevel, setTransient, wm_withdraw from pysollib.mfxutil import kwdefault, KwStruct, openURL -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class _MyDialog(gtk.Dialog): def __init__(self): @@ -208,9 +208,9 @@ class MfxMessageDialog(MfxDialog): return MfxDialog.initKw(self, kw) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class PysolAboutDialog(MfxDialog): def __init__(self, app, parent, title, **kw): @@ -257,9 +257,9 @@ class PysolAboutDialog(MfxDialog): openURL(self._url) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class MfxExceptionDialog(MfxDialog): def __init__(self, parent, ex, title="Error", **kw): @@ -276,9 +276,9 @@ class MfxExceptionDialog(MfxDialog): MfxDialog.__init__(self, parent, title, **kw.__dict__) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class MfxSimpleEntry(_MyDialog): def __init__(self, parent, title, label, value, resizable=0, **kw): diff --git a/pysollib/pysolgtk/tkwrap.py b/pysollib/pysolgtk/tkwrap.py index e6917cda..41432d1f 100644 --- a/pysollib/pysolgtk/tkwrap.py +++ b/pysollib/pysolgtk/tkwrap.py @@ -36,9 +36,9 @@ from pysollib.settings import TITLE, VERSION from tkutil import makeToplevel, loadImage -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class TclError: pass @@ -47,9 +47,9 @@ def make_help_toplevel(parent, title=None, class_=None): return makeToplevel(parent, title=title, class_=class_, gtkclass=_MfxToplevel) -# /*********************************************************************** -# // A toplevel window. -# ************************************************************************/ +# ************************************************************************ +# * A toplevel window. +# ************************************************************************ class _MfxToplevel(gtk.Window): def __init__(self, *args, **kw): @@ -212,9 +212,9 @@ class _MfxToplevel(gtk.Window): -# /*********************************************************************** -# // The root toplevel window of an application. -# ************************************************************************/ +# ************************************************************************ +# * The root toplevel window of an application. +# ************************************************************************ class MfxRoot(_MfxToplevel): def __init__(self, **kw): diff --git a/pysollib/pysolgtk/toolbar.py b/pysollib/pysolgtk/toolbar.py index d8e4b100..4a6b3403 100644 --- a/pysollib/pysolgtk/toolbar.py +++ b/pysollib/pysolgtk/toolbar.py @@ -31,9 +31,9 @@ from gtk import gdk -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class PysolToolbarTk: def __init__(self, top, menubar, dir, size=0, relief=0, compound=None): diff --git a/pysollib/pysolrandom.py b/pysollib/pysolrandom.py index 0ae56d0f..e6fbb004 100644 --- a/pysollib/pysolrandom.py +++ b/pysollib/pysolrandom.py @@ -28,11 +28,11 @@ import random from mfxutil import SubclassResponsibility -# /*********************************************************************** -# // Abstract class for PySol Random number generator. -# // -# // We use a seed of type long in the range [0, MAX_SEED]. -# ************************************************************************/ +# ************************************************************************ +# * Abstract class for PySol Random number generator. +# * +# * We use a seed of type long in the range [0, MAX_SEED]. +# ************************************************************************ class BasicRandom: #MAX_SEED = 0L @@ -70,10 +70,10 @@ class BasicRandom: return t -# /*********************************************************************** -# // Mersenne Twister random number generator -# // uses standart python module `random' -# ************************************************************************/ +# ************************************************************************ +# * Mersenne Twister random number generator +# * uses standart python module `random' +# ************************************************************************ class MTRandom(BasicRandom, random.Random): @@ -89,10 +89,10 @@ class MTRandom(BasicRandom, random.Random): self.setstate(self.initial_state) -# /*********************************************************************** -# // Wichman-Hill random number generator -# // uses standart python module `random' -# ************************************************************************/ +# ************************************************************************ +# * Wichman-Hill random number generator +# * uses standart python module `random' +# ************************************************************************ class WHRandom(BasicRandom, random.WichmannHill): @@ -108,9 +108,9 @@ class WHRandom(BasicRandom, random.WichmannHill): self.setstate(self.initial_state) -# /*********************************************************************** -# // Abstract class for LC Random number generators. -# ************************************************************************/ +# ************************************************************************ +# * Abstract class for LC Random number generators. +# ************************************************************************ class MFXRandom(BasicRandom): @@ -161,13 +161,13 @@ class MFXRandom(BasicRandom): n -= 1 -# /*********************************************************************** -# // Linear Congruential random generator -# // -# // Knuth, Donald.E., "The Art of Computer Programming,", Vol 2, -# // Seminumerical Algorithms, Third Edition, Addison-Wesley, 1998, -# // p. 106 (line 26) & p. 108 -# ************************************************************************/ +# ************************************************************************ +# * Linear Congruential random generator +# * +# * Knuth, Donald.E., "The Art of Computer Programming,", Vol 2, +# * Seminumerical Algorithms, Third Edition, Addison-Wesley, 1998, +# * p. 106 (line 26) & p. 108 +# ************************************************************************ class LCRandom64(MFXRandom): @@ -176,11 +176,11 @@ class LCRandom64(MFXRandom): return ((self.seed >> 21) & 0x7fffffffL) / 2147483648.0 -# /*********************************************************************** -# // Linear Congruential random generator -# // In PySol this is only used for 0 <= seed <= 32000 -# // for Windows FreeCell compatibility -# ************************************************************************/ +# ************************************************************************ +# * Linear Congruential random generator +# * In PySol this is only used for 0 <= seed <= 32000 +# * for Windows FreeCell compatibility +# ************************************************************************ class LCRandom31(MFXRandom): MAX_SEED = 0x7fffffffL # 31 bits @@ -210,9 +210,9 @@ class LCRandom31(MFXRandom): PysolRandom = MTRandom -# /*********************************************************************** -# // PySol support code -# ************************************************************************/ +# ************************************************************************ +# * PySol support code +# ************************************************************************ # construct Random from seed string def constructRandom(s): diff --git a/pysollib/resource.py b/pysollib/resource.py index bac770a0..49e7f835 100644 --- a/pysollib/resource.py +++ b/pysollib/resource.py @@ -30,9 +30,9 @@ from mfxutil import Struct, KwStruct from settings import DEBUG -# /*********************************************************************** -# // Abstract -# ************************************************************************/ +# ************************************************************************ +# * Abstract +# ************************************************************************ class Resource(Struct): def __init__(self, **kw): @@ -152,9 +152,9 @@ class ResourceManager: return result -# /*********************************************************************** -# // Cardset -# ************************************************************************/ +# ************************************************************************ +# * Cardset +# ************************************************************************ # CardsetInfo constants class CSI: @@ -479,9 +479,9 @@ class CardsetManager(ResourceManager): ResourceManager.register(self, cs) -# /*********************************************************************** -# // Tile -# ************************************************************************/ +# ************************************************************************ +# * Tile +# ************************************************************************ class Tile(Resource): def __init__(self, **kw): @@ -494,9 +494,9 @@ class TileManager(ResourceManager): pass -# /*********************************************************************** -# // Sample -# ************************************************************************/ +# ************************************************************************ +# * Sample +# ************************************************************************ class Sample(Resource): def __init__(self, **kw): @@ -508,9 +508,9 @@ class SampleManager(ResourceManager): pass -# /*********************************************************************** -# // Music -# ************************************************************************/ +# ************************************************************************ +# * Music +# ************************************************************************ class Music(Sample): pass diff --git a/pysollib/stack.py b/pysollib/stack.py index 88f26299..44cedff3 100644 --- a/pysollib/stack.py +++ b/pysollib/stack.py @@ -112,10 +112,10 @@ from settings import TOOLKIT from settings import DEBUG -# /*********************************************************************** -# // Let's start with some test methods for cards. -# // Empty card-lists return false. -# ************************************************************************/ +# ************************************************************************ +# * Let's start with some test methods for cards. +# * Empty card-lists return false. +# ************************************************************************ # check that all cards are face-up def cardsFaceUp(cards): @@ -203,9 +203,9 @@ def getPileFromStacks(stacks, reverse=0): return cards -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Stack: # A generic stack of cards. @@ -1566,9 +1566,9 @@ class Stack: else: return ungettext('%d card', '%d cards', n) % n -# /*********************************************************************** -# // Abstract interface that supports a concept of dealing. -# ************************************************************************/ +# ************************************************************************ +# * Abstract interface that supports a concept of dealing. +# ************************************************************************ class DealRow_StackMethods: # Deal a card to each of the RowStacks. Return number of cards dealt. @@ -1711,9 +1711,9 @@ class RedealCards_StackMethods: return num_cards -# /*********************************************************************** -# // The Talon is a stack with support for dealing. -# ************************************************************************/ +# ************************************************************************ +# * The Talon is a stack with support for dealing. +# ************************************************************************ class TalonStack(Stack, DealRow_StackMethods, @@ -1944,12 +1944,12 @@ class GroundsForADivorceTalonStack(DealRowRedealTalonStack): return 0 -# /*********************************************************************** -# // An OpenStack is a stack where cards can be placed and dragged -# // (i.e. FoundationStack, RowStack, ReserveStack, ...) -# // -# // Note that it defaults to max_move=1 and max_accept=0. -# ************************************************************************/ +# ************************************************************************ +# * An OpenStack is a stack where cards can be placed and dragged +# * (i.e. FoundationStack, RowStack, ReserveStack, ...) +# * +# * Note that it defaults to max_move=1 and max_accept=0. +# ************************************************************************ class OpenStack(Stack): def __init__(self, x, y, game, **cap): @@ -2114,9 +2114,9 @@ class OpenStack(Stack): return '' -# /*********************************************************************** -# // Foundations stacks -# ************************************************************************/ +# ************************************************************************ +# * Foundations stacks +# ************************************************************************ class AbstractFoundationStack(OpenStack): def __init__(self, x, y, game, suit, **cap): @@ -2275,9 +2275,9 @@ class Spider_RK_Foundation(Spider_SS_Foundation): -# /*********************************************************************** -# // Abstract classes for row stacks. -# ************************************************************************/ +# ************************************************************************ +# * Abstract classes for row stacks. +# ************************************************************************ # Abstract class. class SequenceStack_StackMethods: @@ -2343,9 +2343,9 @@ class SequenceRowStack(SequenceStack_StackMethods, BasicRowStack): return self._getBaseCard() -# /*********************************************************************** -# // Row stacks (the main playing stacks on the Tableau). -# ************************************************************************/ +# ************************************************************************ +# * Row stacks (the main playing stacks on the Tableau). +# ************************************************************************ # # Implementation of common row stacks follows here. @@ -2640,9 +2640,9 @@ class SuperMoveBO_RowStack(SuperMoveStack_StackMethods, BO_RowStack): return len(cards) <= max_move -# /*********************************************************************** -# // WasteStack (a helper stack for the Talon, e.g. in Klondike) -# ************************************************************************/ +# ************************************************************************ +# * WasteStack (a helper stack for the Talon, e.g. in Klondike) +# ************************************************************************ class WasteStack(OpenStack): def getHelp(self): @@ -2748,9 +2748,9 @@ class OpenTalonStack(TalonStack, OpenStack): return OpenStack.clickHandler(self, event) -# /*********************************************************************** -# // ReserveStack (free cell) -# ************************************************************************/ +# ************************************************************************ +# * ReserveStack (free cell) +# ************************************************************************ class ReserveStack(OpenStack): def __init__(self, x, y, game, **cap): @@ -2765,9 +2765,9 @@ class ReserveStack(OpenStack): return _('Free cell.') -# /*********************************************************************** -# // InvisibleStack (an internal off-screen stack to hold cards) -# ************************************************************************/ +# ************************************************************************ +# * InvisibleStack (an internal off-screen stack to hold cards) +# ************************************************************************ class InvisibleStack(Stack): def __init__(self, game, **cap): @@ -2787,12 +2787,12 @@ class InvisibleStack(Stack): getBottomImage = Stack._getNoneBottomImage -# /*********************************************************************** -# // ArbitraryStack (stack with arbitrary access) -# // -# // NB: don't support hint and demo for non-top cards -# // NB: this stack only for CARD_XOFFSET == 0 -# ************************************************************************/ +# ************************************************************************ +# * ArbitraryStack (stack with arbitrary access) +# * +# * NB: don't support hint and demo for non-top cards +# * NB: this stack only for CARD_XOFFSET == 0 +# ************************************************************************ class ArbitraryStack(OpenStack): @@ -2889,12 +2889,12 @@ class ArbitraryStack(OpenStack): return 0 -# /*********************************************************************** -# // A StackWrapper is a functor (function object) that creates a -# // new stack when called, i.e. it wraps the constructor. -# // -# // "cap" are the capabilites, see class Stack above. -# ************************************************************************/ +# ************************************************************************ +# * A StackWrapper is a functor (function object) that creates a +# * new stack when called, i.e. it wraps the constructor. +# * +# * "cap" are the capabilites, see class Stack above. +# ************************************************************************ # self.cap override any call-time cap class StackWrapper: diff --git a/pysollib/stats.py b/pysollib/stats.py index 48ecd5cc..16249efb 100644 --- a/pysollib/stats.py +++ b/pysollib/stats.py @@ -30,9 +30,9 @@ from mfxutil import format_time from gamedb import GI -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class PysolStatsFormatter: @@ -236,9 +236,9 @@ class FileStatsFormatter(PysolStatsFormatter): return self.writeLog(player, header, prev_games) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class ProgressionFormatter: diff --git a/pysollib/tile/card.py b/pysollib/tile/card.py index acba753e..70bd2a3d 100644 --- a/pysollib/tile/card.py +++ b/pysollib/tile/card.py @@ -32,9 +32,9 @@ from pysollib.acard import AbstractCard from tkcanvas import MfxCanvasGroup, MfxCanvasImage -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class _HideableCard(AbstractCard): def hide(self, stack): @@ -53,15 +53,15 @@ class _HideableCard(AbstractCard): return 1 -# /*********************************************************************** -# // New implemetation since 2.10 -# // -# // We use a single CanvasImage and call CanvasImage.config() to -# // turn the card. -# // This makes turning cards a little bit slower, but dragging cards -# // around is noticeable faster as the total number of images is -# // reduced by half. -# ************************************************************************/ +# ************************************************************************ +# * New implemetation since 2.10 +# * +# * We use a single CanvasImage and call CanvasImage.config() to +# * turn the card. +# * This makes turning cards a little bit slower, but dragging cards +# * around is noticeable faster as the total number of images is +# * reduced by half. +# ************************************************************************ class _OneImageCard(_HideableCard): def __init__(self, id, deck, suit, rank, game, x=0, y=0): @@ -109,11 +109,11 @@ class _OneImageCard(_HideableCard): -# /*********************************************************************** -# // New idea since 3.00 -# // -# // Hide a card by configuring the canvas image to None. -# ************************************************************************/ +# ************************************************************************ +# * New idea since 3.00 +# * +# * Hide a card by configuring the canvas image to None. +# ************************************************************************ class _OneImageCardWithHideByConfig(_OneImageCard): def hide(self, stack): @@ -156,13 +156,13 @@ class _OneImageCardWithHideByConfig(_OneImageCard): self._setImage(image=image) -# /*********************************************************************** -# // Old implemetation prior to 2.10 -# // -# // The card consists of two CanvasImages. To show the card face up, -# // the face item is placed in front of the back. To show it face -# // down, this is reversed. -# ************************************************************************/ +# ************************************************************************ +# * Old implemetation prior to 2.10 +# * +# * The card consists of two CanvasImages. To show the card face up, +# * the face item is placed in front of the back. To show it face +# * down, this is reversed. +# ************************************************************************ class _TwoImageCard(_HideableCard): # Private instance variables: @@ -191,13 +191,13 @@ class _TwoImageCard(_HideableCard): self.__back.config(image=image) -# /*********************************************************************** -# // New idea since 2.90 -# // -# // The card consists of two CanvasImages. Instead of raising -# // one image above the other we move the inactive image out -# // of the visible canvas. -# ************************************************************************/ +# ************************************************************************ +# * New idea since 2.90 +# * +# * The card consists of two CanvasImages. Instead of raising +# * one image above the other we move the inactive image out +# * of the visible canvas. +# ************************************************************************ class _TwoImageCardWithHideItem(_HideableCard): # Private instance variables: diff --git a/pysollib/tile/colorsdialog.py b/pysollib/tile/colorsdialog.py index dab7e894..7a185b05 100644 --- a/pysollib/tile/colorsdialog.py +++ b/pysollib/tile/colorsdialog.py @@ -34,9 +34,9 @@ from pysollib.mfxutil import KwStruct # Toolkit imports from tkwidget import MfxDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class ColorsDialog(MfxDialog): def __init__(self, parent, title, app, **kw): diff --git a/pysollib/tile/edittextdialog.py b/pysollib/tile/edittextdialog.py index 12f299bb..39183096 100644 --- a/pysollib/tile/edittextdialog.py +++ b/pysollib/tile/edittextdialog.py @@ -33,9 +33,9 @@ from pysollib.mfxutil import KwStruct # Toolkit imports from tkwidget import MfxDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class EditTextDialog(MfxDialog): diff --git a/pysollib/tile/findcarddialog.py b/pysollib/tile/findcarddialog.py index 8309a997..2f57d979 100644 --- a/pysollib/tile/findcarddialog.py +++ b/pysollib/tile/findcarddialog.py @@ -38,9 +38,9 @@ from tkcanvas import MfxCanvas, MfxCanvasGroup, MfxCanvasImage, MfxCanvasRectang from pysollib.settings import TITLE -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ LARGE_EMBLEMS_SIZE = (38, 34) SMALL_EMBLEMS_SIZE = (31, 21) diff --git a/pysollib/tile/fontsdialog.py b/pysollib/tile/fontsdialog.py index d55e5091..c367abf1 100644 --- a/pysollib/tile/fontsdialog.py +++ b/pysollib/tile/fontsdialog.py @@ -37,9 +37,9 @@ from tkutil import bind from tkwidget import PysolScale -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class FontChooserDialog(MfxDialog): def __init__(self, parent, title, init_font, **kw): @@ -146,9 +146,9 @@ class FontChooserDialog(MfxDialog): ) return MfxDialog.initKw(self, kw) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class FontsDialog(MfxDialog): def __init__(self, parent, title, app, **kw): diff --git a/pysollib/tile/gameinfodialog.py b/pysollib/tile/gameinfodialog.py index eb303492..83e4cfbc 100644 --- a/pysollib/tile/gameinfodialog.py +++ b/pysollib/tile/gameinfodialog.py @@ -34,9 +34,9 @@ from pysollib.gamedb import GI # Toolkit imports from tkwidget import MfxDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class GameInfoDialog(MfxDialog): def __init__(self, parent, title, app, **kw): diff --git a/pysollib/tile/menubar.py b/pysollib/tile/menubar.py index ef7347cc..392e880b 100644 --- a/pysollib/tile/menubar.py +++ b/pysollib/tile/menubar.py @@ -54,9 +54,9 @@ from tkwidget import MfxMessageDialog from tkconst import TOOLBAR_BUTTONS -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ def createToolbarMenu(menubar, menu): tearoff = menu.cget('tearoff') @@ -105,9 +105,9 @@ def createToolbarMenu(menubar, menu): command=lambda m=menubar, w=w: m.mOptToolbarConfig(w)) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class MfxMenubar(Tkinter.Menu): addPath = None @@ -158,11 +158,11 @@ class MfxMenu(MfxMenubar): master.add_cascade(menu=self, name=name, label=label, underline=underline) -# /*********************************************************************** -# // - create menubar -# // - update menubar -# // - menu actions -# ************************************************************************/ +# ************************************************************************ +# * - create menubar +# * - update menubar +# * - menu actions +# ************************************************************************ class PysolMenubarTk: def __init__(self, app, top, progress=None): diff --git a/pysollib/tile/playeroptionsdialog.py b/pysollib/tile/playeroptionsdialog.py index 5d25c62a..058f8101 100644 --- a/pysollib/tile/playeroptionsdialog.py +++ b/pysollib/tile/playeroptionsdialog.py @@ -34,9 +34,9 @@ from pysollib.mfxutil import KwStruct from tkwidget import MfxDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class PlayerOptionsDialog(MfxDialog): def __init__(self, parent, title, app, **kw): diff --git a/pysollib/tile/progressbar.py b/pysollib/tile/progressbar.py index d781a120..024f88b2 100644 --- a/pysollib/tile/progressbar.py +++ b/pysollib/tile/progressbar.py @@ -32,9 +32,9 @@ from tkconst import EVENT_HANDLED from tkutil import makeToplevel, setTransient -# /*********************************************************************** -# // a simple progress bar -# ************************************************************************/ +# ************************************************************************ +# * a simple progress bar +# ************************************************************************ class PysolProgressBar: def __init__(self, app, parent, title=None, images=None, color="blue", @@ -99,9 +99,9 @@ class PysolProgressBar: self.top.update() -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class TestProgressBar: diff --git a/pysollib/tile/selectcardset.py b/pysollib/tile/selectcardset.py index 7db38413..81a76624 100644 --- a/pysollib/tile/selectcardset.py +++ b/pysollib/tile/selectcardset.py @@ -41,9 +41,9 @@ from selecttree import SelectDialogTreeLeaf, SelectDialogTreeNode from selecttree import SelectDialogTreeData, SelectDialogTreeCanvas -# /*********************************************************************** -# // Nodes -# ************************************************************************/ +# ************************************************************************ +# * Nodes +# ************************************************************************ class SelectCardsetLeaf(SelectDialogTreeLeaf): pass @@ -59,9 +59,9 @@ class SelectCardsetNode(SelectDialogTreeNode): return contents or self.tree.data.no_contents -# /*********************************************************************** -# // Tree database -# ************************************************************************/ +# ************************************************************************ +# * Tree database +# ************************************************************************ class SelectCardsetData(SelectDialogTreeData): def __init__(self, manager, key): @@ -148,9 +148,9 @@ class SelectCardsetByTypeData(SelectDialogTreeData): )) -# /*********************************************************************** -# // Canvas that shows the tree -# ************************************************************************/ +# ************************************************************************ +# * Canvas that shows the tree +# ************************************************************************ class SelectCardsetTree(SelectDialogTreeCanvas): data = None @@ -160,9 +160,9 @@ class SelectCardsetByTypeTree(SelectDialogTreeCanvas): data = None -# /*********************************************************************** -# // Dialog -# ************************************************************************/ +# ************************************************************************ +# * Dialog +# ************************************************************************ class SelectCardsetDialogWithPreview(MfxDialog): Tree_Class = SelectCardsetTree @@ -286,9 +286,9 @@ class SelectCardsetByTypeDialogWithPreview(SelectCardsetDialogWithPreview): TreeDataHolder_Class = SelectCardsetByTypeTree TreeData_Class = SelectCardsetByTypeData -# /*********************************************************************** -# // Cardset Info -# ************************************************************************/ +# ************************************************************************ +# * Cardset Info +# ************************************************************************ class CardsetInfoDialog(MfxDialog): def __init__(self, parent, title, cardset, images, **kw): diff --git a/pysollib/tile/selectgame.py b/pysollib/tile/selectgame.py index 75c3d468..f9bfa4e0 100644 --- a/pysollib/tile/selectgame.py +++ b/pysollib/tile/selectgame.py @@ -41,9 +41,9 @@ from selecttree import SelectDialogTreeLeaf, SelectDialogTreeNode from selecttree import SelectDialogTreeData, SelectDialogTreeCanvas -# /*********************************************************************** -# // Nodes -# ************************************************************************/ +# ************************************************************************ +# * Nodes +# ************************************************************************ class SelectGameLeaf(SelectDialogTreeLeaf): pass @@ -73,9 +73,9 @@ class SelectGameNode(SelectDialogTreeNode): return contents or self.tree.data.no_games -# /*********************************************************************** -# // Tree database -# ************************************************************************/ +# ************************************************************************ +# * Tree database +# ************************************************************************ class SelectGameData(SelectDialogTreeData): def __init__(self, app): @@ -241,9 +241,9 @@ class SelectGameData(SelectDialogTreeData): )) -# /*********************************************************************** -# // Canvas that shows the tree -# ************************************************************************/ +# ************************************************************************ +# * Canvas that shows the tree +# ************************************************************************ class SelectGameTreeWithPreview(SelectDialogTreeCanvas): data = None @@ -254,9 +254,9 @@ class SelectGameTree(SelectGameTreeWithPreview): self.doubleClick(event) -# /*********************************************************************** -# // Dialog -# ************************************************************************/ +# ************************************************************************ +# * Dialog +# ************************************************************************ class SelectGameDialog(MfxDialog): Tree_Class = SelectGameTree @@ -314,9 +314,9 @@ class SelectGameDialog(MfxDialog): MfxDialog.mDone(self, button) -# /*********************************************************************** -# // Dialog -# ************************************************************************/ +# ************************************************************************ +# * Dialog +# ************************************************************************ class SelectGameDialogWithPreview(SelectGameDialog): Tree_Class = SelectGameTreeWithPreview diff --git a/pysollib/tile/selecttile.py b/pysollib/tile/selecttile.py index 7d5912d7..341febe7 100644 --- a/pysollib/tile/selecttile.py +++ b/pysollib/tile/selecttile.py @@ -36,9 +36,9 @@ from selecttree import SelectDialogTreeLeaf, SelectDialogTreeNode from selecttree import SelectDialogTreeData, SelectDialogTreeCanvas -# /*********************************************************************** -# // Nodes -# ************************************************************************/ +# ************************************************************************ +# * Nodes +# ************************************************************************ class SelectTileLeaf(SelectDialogTreeLeaf): pass @@ -54,9 +54,9 @@ class SelectTileNode(SelectDialogTreeNode): return contents or self.tree.data.no_contents -# /*********************************************************************** -# // Tree database -# ************************************************************************/ +# ************************************************************************ +# * Tree database +# ************************************************************************ class SelectTileData(SelectDialogTreeData): def __init__(self, manager, key): @@ -80,17 +80,17 @@ class SelectTileData(SelectDialogTreeData): ) -# /*********************************************************************** -# // Canvas that shows the tree -# ************************************************************************/ +# ************************************************************************ +# * Canvas that shows the tree +# ************************************************************************ class SelectTileTree(SelectDialogTreeCanvas): data = None -# /*********************************************************************** -# // Dialog -# ************************************************************************/ +# ************************************************************************ +# * Dialog +# ************************************************************************ class SelectTileDialogWithPreview(MfxDialog): Tree_Class = SelectTileTree diff --git a/pysollib/tile/selecttree.py b/pysollib/tile/selecttree.py index fa2855bd..0ce9dd9b 100644 --- a/pysollib/tile/selecttree.py +++ b/pysollib/tile/selecttree.py @@ -30,9 +30,9 @@ import tkFont from tktree import MfxTreeLeaf, MfxTreeNode, MfxTreeInCanvas -# /*********************************************************************** -# // Nodes -# ************************************************************************/ +# ************************************************************************ +# * Nodes +# ************************************************************************ class SelectDialogTreeLeaf(MfxTreeLeaf): def drawSymbol(self, x, y, **kw): @@ -68,9 +68,9 @@ class SelectDialogTreeNode(MfxTreeNode): return [] -# /*********************************************************************** -# // Tree database -# ************************************************************************/ +# ************************************************************************ +# * Tree database +# ************************************************************************ class SelectDialogTreeData: img = [] # loaded in Application.loadImages3 @@ -79,9 +79,9 @@ class SelectDialogTreeData: self.tree_yview = (0.0, 1.0) -# /*********************************************************************** -# // Canvas that shows the tree (left side) -# ************************************************************************/ +# ************************************************************************ +# * Canvas that shows the tree (left side) +# ************************************************************************ class SelectDialogTreeCanvas(MfxTreeInCanvas): def __init__(self, dialog, parent, key, default, diff --git a/pysollib/tile/solverdialog.py b/pysollib/tile/solverdialog.py index c75c0215..f41de7e8 100644 --- a/pysollib/tile/solverdialog.py +++ b/pysollib/tile/solverdialog.py @@ -43,9 +43,9 @@ from tkwidget import MfxDialog from tkwidget import PysolCombo -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class SolverDialog(MfxDialog): diff --git a/pysollib/tile/soundoptionsdialog.py b/pysollib/tile/soundoptionsdialog.py index 32c0a9fb..22806b51 100644 --- a/pysollib/tile/soundoptionsdialog.py +++ b/pysollib/tile/soundoptionsdialog.py @@ -39,9 +39,9 @@ from tkwidget import MfxDialog, MfxMessageDialog from tkwidget import PysolScale -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class SoundOptionsDialog(MfxDialog): diff --git a/pysollib/tile/statusbar.py b/pysollib/tile/statusbar.py index c19dadc5..6fa0faa9 100644 --- a/pysollib/tile/statusbar.py +++ b/pysollib/tile/statusbar.py @@ -40,9 +40,9 @@ if __name__ == '__main__': # Toolkit imports from tkwidget import MfxTooltip -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class MfxStatusbar: def __init__(self, top, row, column, columnspan): @@ -179,9 +179,9 @@ class HtmlStatusbar(MfxStatusbar): self._createSizegrip() -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class TestStatusbar(PysolStatusbar): diff --git a/pysollib/tile/timeoutsdialog.py b/pysollib/tile/timeoutsdialog.py index f4de902e..8583a338 100644 --- a/pysollib/tile/timeoutsdialog.py +++ b/pysollib/tile/timeoutsdialog.py @@ -34,9 +34,9 @@ from pysollib.mfxutil import KwStruct from tkwidget import MfxDialog, PysolScale -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class TimeoutsDialog(MfxDialog): def __init__(self, parent, title, app, **kw): diff --git a/pysollib/tile/tkcanvas.py b/pysollib/tile/tkcanvas.py index f4719232..a8f19500 100644 --- a/pysollib/tile/tkcanvas.py +++ b/pysollib/tile/tkcanvas.py @@ -39,9 +39,9 @@ from pysollib.mfxutil import Image, ImageTk from tkutil import bind, unbind_destroy, loadImage -# /*********************************************************************** -# // canvas items -# ************************************************************************/ +# ************************************************************************ +# * canvas items +# ************************************************************************ class MfxCanvasGroup(Canvas.Group): def __init__(self, canvas, tag=None): @@ -107,9 +107,9 @@ class MfxCanvasText(Canvas.CanvasText): self.addtag(group) -# /*********************************************************************** -# // canvas -# ************************************************************************/ +# ************************************************************************ +# * canvas +# ************************************************************************ class MfxCanvas(Tkinter.Canvas): def __init__(self, *args, **kw): diff --git a/pysollib/tile/tkconst.py b/pysollib/tile/tkconst.py index c7fb4ec1..7170cc15 100644 --- a/pysollib/tile/tkconst.py +++ b/pysollib/tile/tkconst.py @@ -42,9 +42,9 @@ __all__ = ['EVENT_HANDLED', import Tkinter -# /*********************************************************************** -# // constants -# ************************************************************************/ +# ************************************************************************ +# * constants +# ************************************************************************ EVENT_HANDLED = "break" EVENT_PROPAGATE = None diff --git a/pysollib/tile/tkhtml.py b/pysollib/tile/tkhtml.py index f0a2371d..45c1a5a2 100644 --- a/pysollib/tile/tkhtml.py +++ b/pysollib/tile/tkhtml.py @@ -48,9 +48,9 @@ from statusbar import HtmlStatusbar REMOTE_PROTOCOLS = ("ftp:", "gopher:", "http:", "mailto:", "news:", "telnet:") -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class tkHTMLWriter(formatter.NullWriter): def __init__(self, text, viewer, app): @@ -190,9 +190,9 @@ class tkHTMLWriter(formatter.NullWriter): self.write(data) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class tkHTMLParser(htmllib.HTMLParser): def anchor_bgn(self, href, name, type): @@ -213,9 +213,9 @@ class tkHTMLParser(htmllib.HTMLParser): self.formatter.writer.viewer.showImage(src, alt, ismap, align, width, height) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class HTMLViewer: symbols_fn = {} # filenames, loaded in Application.loadImages3 @@ -511,9 +511,9 @@ to open the following URL: -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ def tkhtml_main(args): diff --git a/pysollib/tile/tkstats.py b/pysollib/tile/tkstats.py index a647e91c..cd383dc7 100644 --- a/pysollib/tile/tkstats.py +++ b/pysollib/tile/tkstats.py @@ -49,9 +49,9 @@ from tkutil import bind, unbind_destroy, loadImage from tkwidget import MfxDialog, MfxMessageDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class StatsDialog(MfxDialog): SELECTED_TAB = 0 @@ -151,9 +151,9 @@ class StatsDialog(MfxDialog): SingleGame_StatsDialog = AllGames_StatsDialog = Top_StatsDialog = ProgressionDialog = StatsDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class SingleGameFrame(ttk.Frame): def __init__(self, dialog, parent, app, player, gameid, **kw): @@ -304,9 +304,9 @@ class SingleGameFrame(ttk.Frame): self._createChartTexts(tx, ty, won, lost) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class TreeFormatter(PysolStatsFormatter): MAX_ROWS = 10000 @@ -406,9 +406,9 @@ class TreeFormatter(PysolStatsFormatter): return self.writeLog(player, prev_games) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class AllGamesFrame(ttk.Frame): @@ -496,9 +496,9 @@ class AllGamesFrame(ttk.Frame): run_button.config(state='disabled') -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class LogDialog(MfxDialog): SELECTED_TAB = 0 @@ -570,9 +570,9 @@ class LogDialog(MfxDialog): FullLog_StatsDialog = SessionLog_StatsDialog = LogDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class FullLogFrame(AllGamesFrame): @@ -606,9 +606,9 @@ class SessionLogFrame(FullLogFrame): self.formatter.writeSessionLog(player) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Status_StatsDialog(MfxMessageDialog): def __init__(self, parent, game): @@ -654,9 +654,9 @@ class Status_StatsDialog(MfxMessageDialog): ) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class _TopDialog(MfxDialog): def __init__(self, parent, title, app, gameid, top, **kw): @@ -834,9 +834,9 @@ class TopFrame(ttk.Frame): d = _TopDialog(self.dialog.top, TOP_TITLE, self.app, gameid, top) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class ProgressionFrame(ttk.Frame): diff --git a/pysollib/tile/tktree.py b/pysollib/tile/tktree.py index ae5e95ec..dfd1f224 100644 --- a/pysollib/tile/tktree.py +++ b/pysollib/tile/tktree.py @@ -30,9 +30,9 @@ from tkutil import bind from tkwidget import MfxScrolledCanvas -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class MfxTreeBaseNode: def __init__(self, tree, parent_node, text, key): @@ -142,9 +142,9 @@ class MfxTreeBaseNode: self.drawSymbol(-1, -1) -# /*********************************************************************** -# // Terminal and non-terminal nodes -# ************************************************************************/ +# ************************************************************************ +# * Terminal and non-terminal nodes +# ************************************************************************ class MfxTreeLeaf(MfxTreeBaseNode): def drawText(self, x, y): @@ -206,9 +206,9 @@ class MfxTreeNode(MfxTreeBaseNode): MfxTreeBaseNode.drawSymbol(self, x, y, color=color) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class MfxTreeInCanvas(MfxScrolledCanvas): class Style: @@ -343,9 +343,9 @@ class MfxTreeInCanvas(MfxScrolledCanvas): self.updateNodesWithTree(node.subnodes, tree) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class DirectoryBrowser(MfxTreeInCanvas): diff --git a/pysollib/tile/tkutil.py b/pysollib/tile/tkutil.py index 84ba18e5..28c2b122 100644 --- a/pysollib/tile/tkutil.py +++ b/pysollib/tile/tkutil.py @@ -53,9 +53,9 @@ from pysollib.mfxutil import Image, ImageTk, ImageOps from pysollib.settings import TITLE, WIN_SYSTEM -# /*********************************************************************** -# // window manager util -# ************************************************************************/ +# ************************************************************************ +# * window manager util +# ************************************************************************ def wm_withdraw(window): window.wm_withdraw() @@ -84,9 +84,9 @@ def wm_get_geometry(window): return l -# /*********************************************************************** -# // window util -# ************************************************************************/ +# ************************************************************************ +# * window util +# ************************************************************************ def setTransient(window, parent, relx=None, rely=None, expose=1): # Make an existing toplevel window transient for a parent. @@ -177,9 +177,9 @@ def __getWidgetXY(widget, parent, relx=None, rely=None, return x, y -# /*********************************************************************** -# // bind wrapper - Tkinter doesn't properly delete all bindings -# ************************************************************************/ +# ************************************************************************ +# * bind wrapper - Tkinter doesn't properly delete all bindings +# ************************************************************************ __mfx_bindings = {} __mfx_wm_protocols = ("WM_DELETE_WINDOW", "WM_TAKE_FOCUS", "WM_SAVE_YOURSELF") @@ -220,9 +220,9 @@ def unbind_destroy(widget): ##print len(__mfx_bindings.keys()) -# /*********************************************************************** -# // timer wrapper - Tkinter doesn't properly delete all commands -# ************************************************************************/ +# ************************************************************************ +# * timer wrapper - Tkinter doesn't properly delete all commands +# ************************************************************************ def after(widget, ms, func, *args): timer = widget.after(ms, func, *args) @@ -241,9 +241,9 @@ def after_cancel(t): pass -# /*********************************************************************** -# // image handling -# ************************************************************************/ +# ************************************************************************ +# * image handling +# ************************************************************************ if Image: class PIL_Image(ImageTk.PhotoImage): @@ -353,9 +353,9 @@ def markImage(image): out = Image.composite(tmp, image, image) return out -# /*********************************************************************** -# // font utils -# ************************************************************************/ +# ************************************************************************ +# * font utils +# ************************************************************************ def get_text_width(text, font, root=None): return Font(root=root, font=font).measure(text) diff --git a/pysollib/tile/tkwidget.py b/pysollib/tile/tkwidget.py index 0f145423..afcc4c75 100644 --- a/pysollib/tile/tkwidget.py +++ b/pysollib/tile/tkwidget.py @@ -49,9 +49,9 @@ from tkutil import makeToplevel, setTransient from tkcanvas import MfxCanvas -# /*********************************************************************** -# // abstract base class for the dialogs in this module -# ************************************************************************/ +# ************************************************************************ +# * abstract base class for the dialogs in this module +# ************************************************************************ class MfxDialog: # ex. _ToplevelDialog img = {} @@ -250,9 +250,9 @@ class MfxDialog: # ex. _ToplevelDialog return focus -# /*********************************************************************** -# // replacement for the tk_dialog script -# ************************************************************************/ +# ************************************************************************ +# * replacement for the tk_dialog script +# ************************************************************************ class MfxMessageDialog(MfxDialog): def __init__(self, parent, title, **kw): @@ -270,9 +270,9 @@ class MfxMessageDialog(MfxDialog): self.mainloop(focus, kw.timeout) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class MfxExceptionDialog(MfxMessageDialog): def __init__(self, parent, ex, title="Error", **kw): @@ -289,9 +289,9 @@ class MfxExceptionDialog(MfxMessageDialog): MfxMessageDialog.__init__(self, parent, title, **kw.getKw()) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class PysolAboutDialog(MfxMessageDialog): def __init__(self, app, parent, title, **kw): @@ -328,9 +328,9 @@ class PysolAboutDialog(MfxMessageDialog): openURL(self._url) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class MfxSimpleEntry(MfxDialog): def __init__(self, parent, title, label, value, **kw): @@ -365,9 +365,9 @@ class MfxSimpleEntry(MfxDialog): raise SystemExit -# /*********************************************************************** -# // a simple tooltip -# ************************************************************************/ +# ************************************************************************ +# * a simple tooltip +# ************************************************************************ class MfxTooltip: last_leave_time = 0 @@ -457,9 +457,9 @@ class MfxTooltip: ##self.tooltip.tkraise() -# /*********************************************************************** -# // A canvas widget with scrollbars and some useful bindings. -# ************************************************************************/ +# ************************************************************************ +# * A canvas widget with scrollbars and some useful bindings. +# ************************************************************************ class MfxScrolledCanvas: def __init__(self, parent, hbar=True, vbar=True, propagate=0, **kw): @@ -653,9 +653,9 @@ class MfxScrolledCanvas: return self._yview('moveto', 1) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class StackDesc: @@ -700,9 +700,9 @@ class StackDesc: self.label.unbind('', b) -# /*********************************************************************** -# // ttk.Scale workaround (label and resolution) -# ************************************************************************/ +# ************************************************************************ +# * ttk.Scale workaround (label and resolution) +# ************************************************************************ class MyPysolScale: def __init__(self, parent, **kw): @@ -799,9 +799,9 @@ PysolScale = MyPysolScale #PysolScale = TkinterScale -# /*********************************************************************** -# // ttk.Combobox workaround (clear selection) -# ************************************************************************/ +# ************************************************************************ +# * ttk.Combobox workaround (clear selection) +# ************************************************************************ class PysolCombo(ttk.Combobox): def __init__(self, master=None, **kw): diff --git a/pysollib/tile/tkwrap.py b/pysollib/tile/tkwrap.py index b93e9d9c..d300eed1 100644 --- a/pysollib/tile/tkwrap.py +++ b/pysollib/tile/tkwrap.py @@ -32,10 +32,10 @@ TclError = Tkinter.TclError from tkconst import EVENT_PROPAGATE -# /*********************************************************************** -# // Wrapper class for Tk. -# // Required so that a Game will get properly destroyed. -# ************************************************************************/ +# ************************************************************************ +# * Wrapper class for Tk. +# * Required so that a Game will get properly destroyed. +# ************************************************************************ class MfxRoot(Tkinter.Tk): def __init__(self, **kw): diff --git a/pysollib/tile/toolbar.py b/pysollib/tile/toolbar.py index f0e399ae..4fbe2882 100644 --- a/pysollib/tile/toolbar.py +++ b/pysollib/tile/toolbar.py @@ -42,9 +42,9 @@ from menubar import createToolbarMenu, MfxMenu from tkutil import loadImage -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class AbstractToolbarButton: def __init__(self, parent, toolbar, toolbar_name, position): @@ -149,9 +149,9 @@ class ToolbarLabel(Tkinter.Message): self.grid_forget() -# /*********************************************************************** -# // Note: Applications should call show/hide after constructor. -# ************************************************************************/ +# ************************************************************************ +# * Note: Applications should call show/hide after constructor. +# ************************************************************************ class PysolToolbarTk: diff --git a/pysollib/tile/wizarddialog.py b/pysollib/tile/wizarddialog.py index fbc02051..ad37033a 100644 --- a/pysollib/tile/wizarddialog.py +++ b/pysollib/tile/wizarddialog.py @@ -38,9 +38,9 @@ from tkwidget import MfxDialog from tkwidget import PysolScale, PysolCombo -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class WizardDialog(MfxDialog): def __init__(self, parent, title, app, **kw): diff --git a/pysollib/tk/card.py b/pysollib/tk/card.py index acba753e..70bd2a3d 100644 --- a/pysollib/tk/card.py +++ b/pysollib/tk/card.py @@ -32,9 +32,9 @@ from pysollib.acard import AbstractCard from tkcanvas import MfxCanvasGroup, MfxCanvasImage -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class _HideableCard(AbstractCard): def hide(self, stack): @@ -53,15 +53,15 @@ class _HideableCard(AbstractCard): return 1 -# /*********************************************************************** -# // New implemetation since 2.10 -# // -# // We use a single CanvasImage and call CanvasImage.config() to -# // turn the card. -# // This makes turning cards a little bit slower, but dragging cards -# // around is noticeable faster as the total number of images is -# // reduced by half. -# ************************************************************************/ +# ************************************************************************ +# * New implemetation since 2.10 +# * +# * We use a single CanvasImage and call CanvasImage.config() to +# * turn the card. +# * This makes turning cards a little bit slower, but dragging cards +# * around is noticeable faster as the total number of images is +# * reduced by half. +# ************************************************************************ class _OneImageCard(_HideableCard): def __init__(self, id, deck, suit, rank, game, x=0, y=0): @@ -109,11 +109,11 @@ class _OneImageCard(_HideableCard): -# /*********************************************************************** -# // New idea since 3.00 -# // -# // Hide a card by configuring the canvas image to None. -# ************************************************************************/ +# ************************************************************************ +# * New idea since 3.00 +# * +# * Hide a card by configuring the canvas image to None. +# ************************************************************************ class _OneImageCardWithHideByConfig(_OneImageCard): def hide(self, stack): @@ -156,13 +156,13 @@ class _OneImageCardWithHideByConfig(_OneImageCard): self._setImage(image=image) -# /*********************************************************************** -# // Old implemetation prior to 2.10 -# // -# // The card consists of two CanvasImages. To show the card face up, -# // the face item is placed in front of the back. To show it face -# // down, this is reversed. -# ************************************************************************/ +# ************************************************************************ +# * Old implemetation prior to 2.10 +# * +# * The card consists of two CanvasImages. To show the card face up, +# * the face item is placed in front of the back. To show it face +# * down, this is reversed. +# ************************************************************************ class _TwoImageCard(_HideableCard): # Private instance variables: @@ -191,13 +191,13 @@ class _TwoImageCard(_HideableCard): self.__back.config(image=image) -# /*********************************************************************** -# // New idea since 2.90 -# // -# // The card consists of two CanvasImages. Instead of raising -# // one image above the other we move the inactive image out -# // of the visible canvas. -# ************************************************************************/ +# ************************************************************************ +# * New idea since 2.90 +# * +# * The card consists of two CanvasImages. Instead of raising +# * one image above the other we move the inactive image out +# * of the visible canvas. +# ************************************************************************ class _TwoImageCardWithHideItem(_HideableCard): # Private instance variables: diff --git a/pysollib/tk/colorsdialog.py b/pysollib/tk/colorsdialog.py index e15da00c..2fd29050 100644 --- a/pysollib/tk/colorsdialog.py +++ b/pysollib/tk/colorsdialog.py @@ -33,9 +33,9 @@ from pysollib.mfxutil import KwStruct # Toolkit imports from tkwidget import MfxDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class ColorsDialog(MfxDialog): def __init__(self, parent, title, app, **kw): diff --git a/pysollib/tk/edittextdialog.py b/pysollib/tk/edittextdialog.py index c4d32ed4..bcf01a10 100644 --- a/pysollib/tk/edittextdialog.py +++ b/pysollib/tk/edittextdialog.py @@ -32,9 +32,9 @@ from pysollib.mfxutil import KwStruct # Toolkit imports from tkwidget import MfxDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class EditTextDialog(MfxDialog): diff --git a/pysollib/tk/findcarddialog.py b/pysollib/tk/findcarddialog.py index 70076441..0ac79554 100644 --- a/pysollib/tk/findcarddialog.py +++ b/pysollib/tk/findcarddialog.py @@ -41,9 +41,9 @@ from tkcanvas import MfxCanvas, MfxCanvasGroup, MfxCanvasImage, MfxCanvasRectang from pysollib.settings import TITLE -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ LARGE_EMBLEMS_SIZE = (38, 34) SMALL_EMBLEMS_SIZE = (31, 21) diff --git a/pysollib/tk/fontsdialog.py b/pysollib/tk/fontsdialog.py index 3b81997c..a42405b8 100644 --- a/pysollib/tk/fontsdialog.py +++ b/pysollib/tk/fontsdialog.py @@ -34,9 +34,9 @@ from pysollib.mfxutil import KwStruct from tkwidget import MfxDialog from tkutil import bind -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class FontChooserDialog(MfxDialog): def __init__(self, parent, title, init_font, **kw): @@ -146,9 +146,9 @@ class FontChooserDialog(MfxDialog): ) return MfxDialog.initKw(self, kw) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class FontsDialog(MfxDialog): def __init__(self, parent, title, app, **kw): diff --git a/pysollib/tk/gameinfodialog.py b/pysollib/tk/gameinfodialog.py index 61200aa6..1d129594 100644 --- a/pysollib/tk/gameinfodialog.py +++ b/pysollib/tk/gameinfodialog.py @@ -34,9 +34,9 @@ from pysollib.gamedb import GI # Toolkit imports from tkwidget import MfxDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class GameInfoDialog(MfxDialog): def __init__(self, parent, title, app, **kw): diff --git a/pysollib/tk/menubar.py b/pysollib/tk/menubar.py index 0d374aa1..76f2ddc9 100644 --- a/pysollib/tk/menubar.py +++ b/pysollib/tk/menubar.py @@ -53,9 +53,9 @@ from solverdialog import connect_game_solver_dialog from tkconst import TOOLBAR_BUTTONS -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ def createToolbarMenu(menubar, menu): tearoff = menu.cget('tearoff') @@ -104,9 +104,9 @@ def createToolbarMenu(menubar, menu): command=lambda m=menubar, w=w: m.mOptToolbarConfig(w)) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class MfxMenubar(Tkinter.Menu): addPath = None @@ -157,11 +157,11 @@ class MfxMenu(MfxMenubar): master.add_cascade(menu=self, name=name, label=label, underline=underline) -# /*********************************************************************** -# // - create menubar -# // - update menubar -# // - menu actions -# ************************************************************************/ +# ************************************************************************ +# * - create menubar +# * - update menubar +# * - menu actions +# ************************************************************************ class PysolMenubarTk: def __init__(self, app, top, progress=None): diff --git a/pysollib/tk/playeroptionsdialog.py b/pysollib/tk/playeroptionsdialog.py index 925990f4..d5470fe8 100644 --- a/pysollib/tk/playeroptionsdialog.py +++ b/pysollib/tk/playeroptionsdialog.py @@ -34,9 +34,9 @@ from tkwidget import MfxDialog from tkutil import bind -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class SelectUserNameDialog(MfxDialog): def __init__(self, parent, title, usernames=[], **kw): @@ -150,9 +150,9 @@ class PlayerOptionsDialog(MfxDialog): return MfxDialog.initKw(self, kw) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ def playeroptionsdialog_main(args): diff --git a/pysollib/tk/progressbar.py b/pysollib/tk/progressbar.py index 792f8b11..d984402f 100644 --- a/pysollib/tk/progressbar.py +++ b/pysollib/tk/progressbar.py @@ -31,9 +31,9 @@ from tkconst import EVENT_HANDLED from tkutil import makeToplevel, setTransient -# /*********************************************************************** -# // a simple progress bar -# ************************************************************************/ +# ************************************************************************ +# * a simple progress bar +# ************************************************************************ class PysolProgressBar: def __init__(self, app, parent, title=None, images=None, color="blue", @@ -112,9 +112,9 @@ class PysolProgressBar: c.update() -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class TestProgressBar: diff --git a/pysollib/tk/selectcardset.py b/pysollib/tk/selectcardset.py index 2e3e4ace..cdc14e55 100644 --- a/pysollib/tk/selectcardset.py +++ b/pysollib/tk/selectcardset.py @@ -40,9 +40,9 @@ from selecttree import SelectDialogTreeLeaf, SelectDialogTreeNode from selecttree import SelectDialogTreeData, SelectDialogTreeCanvas -# /*********************************************************************** -# // Nodes -# ************************************************************************/ +# ************************************************************************ +# * Nodes +# ************************************************************************ class SelectCardsetLeaf(SelectDialogTreeLeaf): pass @@ -58,9 +58,9 @@ class SelectCardsetNode(SelectDialogTreeNode): return contents or self.tree.data.no_contents -# /*********************************************************************** -# // Tree database -# ************************************************************************/ +# ************************************************************************ +# * Tree database +# ************************************************************************ class SelectCardsetData(SelectDialogTreeData): def __init__(self, manager, key): @@ -147,9 +147,9 @@ class SelectCardsetByTypeData(SelectDialogTreeData): )) -# /*********************************************************************** -# // Canvas that shows the tree -# ************************************************************************/ +# ************************************************************************ +# * Canvas that shows the tree +# ************************************************************************ class SelectCardsetTree(SelectDialogTreeCanvas): data = None @@ -159,9 +159,9 @@ class SelectCardsetByTypeTree(SelectDialogTreeCanvas): data = None -# /*********************************************************************** -# // Dialog -# ************************************************************************/ +# ************************************************************************ +# * Dialog +# ************************************************************************ class SelectCardsetDialogWithPreview(MfxDialog): Tree_Class = SelectCardsetTree @@ -285,9 +285,9 @@ class SelectCardsetByTypeDialogWithPreview(SelectCardsetDialogWithPreview): TreeDataHolder_Class = SelectCardsetByTypeTree TreeData_Class = SelectCardsetByTypeData -# /*********************************************************************** -# // Cardset Info -# ************************************************************************/ +# ************************************************************************ +# * Cardset Info +# ************************************************************************ class CardsetInfoDialog(MfxDialog): def __init__(self, parent, title, cardset, images, **kw): diff --git a/pysollib/tk/selectgame.py b/pysollib/tk/selectgame.py index d904d072..68a98041 100644 --- a/pysollib/tk/selectgame.py +++ b/pysollib/tk/selectgame.py @@ -41,9 +41,9 @@ from selecttree import SelectDialogTreeLeaf, SelectDialogTreeNode from selecttree import SelectDialogTreeData, SelectDialogTreeCanvas -# /*********************************************************************** -# // Nodes -# ************************************************************************/ +# ************************************************************************ +# * Nodes +# ************************************************************************ class SelectGameLeaf(SelectDialogTreeLeaf): pass @@ -73,9 +73,9 @@ class SelectGameNode(SelectDialogTreeNode): return contents or self.tree.data.no_games -# /*********************************************************************** -# // Tree database -# ************************************************************************/ +# ************************************************************************ +# * Tree database +# ************************************************************************ class SelectGameData(SelectDialogTreeData): def __init__(self, app): @@ -242,9 +242,9 @@ class SelectGameData(SelectDialogTreeData): )) -# /*********************************************************************** -# // Canvas that shows the tree -# ************************************************************************/ +# ************************************************************************ +# * Canvas that shows the tree +# ************************************************************************ class SelectGameTreeWithPreview(SelectDialogTreeCanvas): data = None @@ -255,9 +255,9 @@ class SelectGameTree(SelectGameTreeWithPreview): self.doubleClick(event) -# /*********************************************************************** -# // Dialog -# ************************************************************************/ +# ************************************************************************ +# * Dialog +# ************************************************************************ class SelectGameDialog(MfxDialog): Tree_Class = SelectGameTree @@ -317,9 +317,9 @@ class SelectGameDialog(MfxDialog): MfxDialog.mDone(self, button) -# /*********************************************************************** -# // Dialog -# ************************************************************************/ +# ************************************************************************ +# * Dialog +# ************************************************************************ class SelectGameDialogWithPreview(SelectGameDialog): Tree_Class = SelectGameTreeWithPreview diff --git a/pysollib/tk/selecttile.py b/pysollib/tk/selecttile.py index f71eddc8..2d5491cc 100644 --- a/pysollib/tk/selecttile.py +++ b/pysollib/tk/selecttile.py @@ -34,9 +34,9 @@ from selecttree import SelectDialogTreeLeaf, SelectDialogTreeNode from selecttree import SelectDialogTreeData, SelectDialogTreeCanvas -# /*********************************************************************** -# // Nodes -# ************************************************************************/ +# ************************************************************************ +# * Nodes +# ************************************************************************ class SelectTileLeaf(SelectDialogTreeLeaf): pass @@ -52,9 +52,9 @@ class SelectTileNode(SelectDialogTreeNode): return contents or self.tree.data.no_contents -# /*********************************************************************** -# // Tree database -# ************************************************************************/ +# ************************************************************************ +# * Tree database +# ************************************************************************ class SelectTileData(SelectDialogTreeData): def __init__(self, manager, key): @@ -78,17 +78,17 @@ class SelectTileData(SelectDialogTreeData): ) -# /*********************************************************************** -# // Canvas that shows the tree -# ************************************************************************/ +# ************************************************************************ +# * Canvas that shows the tree +# ************************************************************************ class SelectTileTree(SelectDialogTreeCanvas): data = None -# /*********************************************************************** -# // Dialog -# ************************************************************************/ +# ************************************************************************ +# * Dialog +# ************************************************************************ class SelectTileDialogWithPreview(MfxDialog): Tree_Class = SelectTileTree diff --git a/pysollib/tk/selecttree.py b/pysollib/tk/selecttree.py index fa2855bd..0ce9dd9b 100644 --- a/pysollib/tk/selecttree.py +++ b/pysollib/tk/selecttree.py @@ -30,9 +30,9 @@ import tkFont from tktree import MfxTreeLeaf, MfxTreeNode, MfxTreeInCanvas -# /*********************************************************************** -# // Nodes -# ************************************************************************/ +# ************************************************************************ +# * Nodes +# ************************************************************************ class SelectDialogTreeLeaf(MfxTreeLeaf): def drawSymbol(self, x, y, **kw): @@ -68,9 +68,9 @@ class SelectDialogTreeNode(MfxTreeNode): return [] -# /*********************************************************************** -# // Tree database -# ************************************************************************/ +# ************************************************************************ +# * Tree database +# ************************************************************************ class SelectDialogTreeData: img = [] # loaded in Application.loadImages3 @@ -79,9 +79,9 @@ class SelectDialogTreeData: self.tree_yview = (0.0, 1.0) -# /*********************************************************************** -# // Canvas that shows the tree (left side) -# ************************************************************************/ +# ************************************************************************ +# * Canvas that shows the tree (left side) +# ************************************************************************ class SelectDialogTreeCanvas(MfxTreeInCanvas): def __init__(self, dialog, parent, key, default, diff --git a/pysollib/tk/solverdialog.py b/pysollib/tk/solverdialog.py index 8cd42fbf..8bfabbb5 100644 --- a/pysollib/tk/solverdialog.py +++ b/pysollib/tk/solverdialog.py @@ -42,9 +42,9 @@ from tkconst import EVENT_HANDLED from tkwidget import MfxDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class SolverDialog(MfxDialog): diff --git a/pysollib/tk/soundoptionsdialog.py b/pysollib/tk/soundoptionsdialog.py index 2d1f1be4..c5e816f3 100644 --- a/pysollib/tk/soundoptionsdialog.py +++ b/pysollib/tk/soundoptionsdialog.py @@ -36,9 +36,9 @@ from pysollib.pysolaudio import pysolsoundserver from tkconst import EVENT_HANDLED from tkwidget import MfxDialog, MfxMessageDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class SoundOptionsDialog(MfxDialog): diff --git a/pysollib/tk/statusbar.py b/pysollib/tk/statusbar.py index fbb96dfd..c20380d6 100644 --- a/pysollib/tk/statusbar.py +++ b/pysollib/tk/statusbar.py @@ -40,9 +40,9 @@ from tkwidget import MfxTooltip from pysollib.settings import WIN_SYSTEM -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class MfxStatusbar: def __init__(self, top, row, column, columnspan): @@ -174,9 +174,9 @@ class HtmlStatusbar(MfxStatusbar): l.config(justify='left', anchor='w', padx=8) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class TestStatusbar(PysolStatusbar): diff --git a/pysollib/tk/timeoutsdialog.py b/pysollib/tk/timeoutsdialog.py index d0ac5564..e4e1aa2f 100644 --- a/pysollib/tk/timeoutsdialog.py +++ b/pysollib/tk/timeoutsdialog.py @@ -32,9 +32,9 @@ from pysollib.mfxutil import KwStruct # Toolkit imports from tkwidget import MfxDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class TimeoutsDialog(MfxDialog): def __init__(self, parent, title, app, **kw): diff --git a/pysollib/tk/tkcanvas.py b/pysollib/tk/tkcanvas.py index 0c219943..57f62a3f 100644 --- a/pysollib/tk/tkcanvas.py +++ b/pysollib/tk/tkcanvas.py @@ -38,9 +38,9 @@ from pysollib.mfxutil import Image, ImageTk from tkutil import bind, unbind_destroy, loadImage -# /*********************************************************************** -# // canvas items -# ************************************************************************/ +# ************************************************************************ +# * canvas items +# ************************************************************************ class MfxCanvasGroup(Canvas.Group): def __init__(self, canvas, tag=None): @@ -106,9 +106,9 @@ class MfxCanvasText(Canvas.CanvasText): self.addtag(group) -# /*********************************************************************** -# // canvas -# ************************************************************************/ +# ************************************************************************ +# * canvas +# ************************************************************************ class MfxCanvas(Tkinter.Canvas): def __init__(self, *args, **kw): diff --git a/pysollib/tk/tkconst.py b/pysollib/tk/tkconst.py index c7fb4ec1..7170cc15 100644 --- a/pysollib/tk/tkconst.py +++ b/pysollib/tk/tkconst.py @@ -42,9 +42,9 @@ __all__ = ['EVENT_HANDLED', import Tkinter -# /*********************************************************************** -# // constants -# ************************************************************************/ +# ************************************************************************ +# * constants +# ************************************************************************ EVENT_HANDLED = "break" EVENT_PROPAGATE = None diff --git a/pysollib/tk/tkhtml.py b/pysollib/tk/tkhtml.py index 491cce1f..4dc4da0d 100644 --- a/pysollib/tk/tkhtml.py +++ b/pysollib/tk/tkhtml.py @@ -47,9 +47,9 @@ from statusbar import HtmlStatusbar REMOTE_PROTOCOLS = ("ftp:", "gopher:", "http:", "mailto:", "news:", "telnet:") -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class tkHTMLWriter(formatter.NullWriter): def __init__(self, text, viewer, app): @@ -189,9 +189,9 @@ class tkHTMLWriter(formatter.NullWriter): self.write(data) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class tkHTMLParser(htmllib.HTMLParser): def anchor_bgn(self, href, name, type): @@ -212,9 +212,9 @@ class tkHTMLParser(htmllib.HTMLParser): self.formatter.writer.viewer.showImage(src, alt, ismap, align, width, height) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class HTMLViewer: symbols_fn = {} # filenames, loaded in Application.loadImages3 @@ -506,9 +506,9 @@ to open the following URL: -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ def tkhtml_main(args): diff --git a/pysollib/tk/tkstats.py b/pysollib/tk/tkstats.py index 2d8ffc8a..73bea2a0 100644 --- a/pysollib/tk/tkstats.py +++ b/pysollib/tk/tkstats.py @@ -50,9 +50,9 @@ from tkwidget import MfxScrolledCanvas # FIXME - this file a quick hack and needs a rewrite -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class SingleGame_StatsDialog(MfxDialog): def __init__(self, parent, title, app, player, gameid, **kw): @@ -284,9 +284,9 @@ class SingleGame_StatsDialog(MfxDialog): return MfxDialog.initKw(self, kw) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class CanvasFormatter(PysolStatsFormatter): def __init__(self, app, canvas, parent_window, font, w, h): @@ -434,9 +434,9 @@ class CanvasFormatter(PysolStatsFormatter): return self.writeLog(player, prev_games) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class AllGames_StatsDialogScrolledCanvas(MfxScrolledCanvas): pass @@ -547,9 +547,9 @@ class AllGames_StatsDialog(MfxDialog): writer.writeStats(player, self.sort_by) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class FullLog_StatsDialog(AllGames_StatsDialog): YVIEW = 1 @@ -581,9 +581,9 @@ class SessionLog_StatsDialog(FullLog_StatsDialog): ) return FullLog_StatsDialog.initKw(self, kw) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class Status_StatsDialog(MfxMessageDialog): def __init__(self, parent, game): @@ -627,9 +627,9 @@ class Status_StatsDialog(MfxMessageDialog): padx=20, ) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class _TopDialog(MfxDialog): def __init__(self, parent, title, top, **kw): @@ -783,9 +783,9 @@ class Top_StatsDialog(MfxDialog): return MfxDialog.initKw(self, kw) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class ProgressionDialog(MfxDialog): def __init__(self, parent, title, app, player, gameid, **kw): diff --git a/pysollib/tk/tktree.py b/pysollib/tk/tktree.py index 6fcf7e77..74c2b0eb 100644 --- a/pysollib/tk/tktree.py +++ b/pysollib/tk/tktree.py @@ -30,9 +30,9 @@ from tkutil import bind from tkwidget import MfxScrolledCanvas -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class MfxTreeBaseNode: def __init__(self, tree, parent_node, text, key): @@ -142,9 +142,9 @@ class MfxTreeBaseNode: self.drawSymbol(-1, -1) -# /*********************************************************************** -# // Terminal and non-terminal nodes -# ************************************************************************/ +# ************************************************************************ +# * Terminal and non-terminal nodes +# ************************************************************************ class MfxTreeLeaf(MfxTreeBaseNode): def drawText(self, x, y): @@ -206,9 +206,9 @@ class MfxTreeNode(MfxTreeBaseNode): MfxTreeBaseNode.drawSymbol(self, x, y, color=color) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class MfxTreeInCanvas(MfxScrolledCanvas): class Style: @@ -341,9 +341,9 @@ class MfxTreeInCanvas(MfxScrolledCanvas): self.updateNodesWithTree(node.subnodes, tree) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class DirectoryBrowser(MfxTreeInCanvas): diff --git a/pysollib/tk/tkutil.py b/pysollib/tk/tkutil.py index 84ba18e5..28c2b122 100644 --- a/pysollib/tk/tkutil.py +++ b/pysollib/tk/tkutil.py @@ -53,9 +53,9 @@ from pysollib.mfxutil import Image, ImageTk, ImageOps from pysollib.settings import TITLE, WIN_SYSTEM -# /*********************************************************************** -# // window manager util -# ************************************************************************/ +# ************************************************************************ +# * window manager util +# ************************************************************************ def wm_withdraw(window): window.wm_withdraw() @@ -84,9 +84,9 @@ def wm_get_geometry(window): return l -# /*********************************************************************** -# // window util -# ************************************************************************/ +# ************************************************************************ +# * window util +# ************************************************************************ def setTransient(window, parent, relx=None, rely=None, expose=1): # Make an existing toplevel window transient for a parent. @@ -177,9 +177,9 @@ def __getWidgetXY(widget, parent, relx=None, rely=None, return x, y -# /*********************************************************************** -# // bind wrapper - Tkinter doesn't properly delete all bindings -# ************************************************************************/ +# ************************************************************************ +# * bind wrapper - Tkinter doesn't properly delete all bindings +# ************************************************************************ __mfx_bindings = {} __mfx_wm_protocols = ("WM_DELETE_WINDOW", "WM_TAKE_FOCUS", "WM_SAVE_YOURSELF") @@ -220,9 +220,9 @@ def unbind_destroy(widget): ##print len(__mfx_bindings.keys()) -# /*********************************************************************** -# // timer wrapper - Tkinter doesn't properly delete all commands -# ************************************************************************/ +# ************************************************************************ +# * timer wrapper - Tkinter doesn't properly delete all commands +# ************************************************************************ def after(widget, ms, func, *args): timer = widget.after(ms, func, *args) @@ -241,9 +241,9 @@ def after_cancel(t): pass -# /*********************************************************************** -# // image handling -# ************************************************************************/ +# ************************************************************************ +# * image handling +# ************************************************************************ if Image: class PIL_Image(ImageTk.PhotoImage): @@ -353,9 +353,9 @@ def markImage(image): out = Image.composite(tmp, image, image) return out -# /*********************************************************************** -# // font utils -# ************************************************************************/ +# ************************************************************************ +# * font utils +# ************************************************************************ def get_text_width(text, font, root=None): return Font(root=root, font=font).measure(text) diff --git a/pysollib/tk/tkwidget.py b/pysollib/tk/tkwidget.py index c61b89ec..47a53090 100644 --- a/pysollib/tk/tkwidget.py +++ b/pysollib/tk/tkwidget.py @@ -48,9 +48,9 @@ from tkutil import makeToplevel, setTransient from tkcanvas import MfxCanvas -# /*********************************************************************** -# // abstract base class for the dialogs in this module -# ************************************************************************/ +# ************************************************************************ +# * abstract base class for the dialogs in this module +# ************************************************************************ class MfxDialog: # ex. _ToplevelDialog img = {} @@ -246,9 +246,9 @@ class MfxDialog: # ex. _ToplevelDialog return focus -# /*********************************************************************** -# // replacement for the tk_dialog script -# ************************************************************************/ +# ************************************************************************ +# * replacement for the tk_dialog script +# ************************************************************************ class MfxMessageDialog(MfxDialog): def __init__(self, parent, title, **kw): @@ -266,9 +266,9 @@ class MfxMessageDialog(MfxDialog): self.mainloop(focus, kw.timeout) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class MfxExceptionDialog(MfxMessageDialog): def __init__(self, parent, ex, title="Error", **kw): @@ -285,9 +285,9 @@ class MfxExceptionDialog(MfxMessageDialog): MfxMessageDialog.__init__(self, parent, title, **kw.getKw()) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class PysolAboutDialog(MfxMessageDialog): def __init__(self, app, parent, title, **kw): @@ -318,9 +318,9 @@ class PysolAboutDialog(MfxMessageDialog): openURL(self._url) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class MfxSimpleEntry(MfxDialog): def __init__(self, parent, title, label, value, **kw): @@ -355,9 +355,9 @@ class MfxSimpleEntry(MfxDialog): raise SystemExit -# /*********************************************************************** -# // a simple tooltip -# ************************************************************************/ +# ************************************************************************ +# * a simple tooltip +# ************************************************************************ class MfxTooltip: last_leave_time = 0 @@ -447,9 +447,9 @@ class MfxTooltip: ##self.tooltip.tkraise() -# /*********************************************************************** -# // A canvas widget with scrollbars and some useful bindings. -# ************************************************************************/ +# ************************************************************************ +# * A canvas widget with scrollbars and some useful bindings. +# ************************************************************************ class MfxScrolledCanvas: def __init__(self, parent, hbar=True, vbar=True, propagate=False, **kw): @@ -643,9 +643,9 @@ class MfxScrolledCanvas: return self._yview('moveto', 1) -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class StackDesc: diff --git a/pysollib/tk/tkwrap.py b/pysollib/tk/tkwrap.py index b93e9d9c..d300eed1 100644 --- a/pysollib/tk/tkwrap.py +++ b/pysollib/tk/tkwrap.py @@ -32,10 +32,10 @@ TclError = Tkinter.TclError from tkconst import EVENT_PROPAGATE -# /*********************************************************************** -# // Wrapper class for Tk. -# // Required so that a Game will get properly destroyed. -# ************************************************************************/ +# ************************************************************************ +# * Wrapper class for Tk. +# * Required so that a Game will get properly destroyed. +# ************************************************************************ class MfxRoot(Tkinter.Tk): def __init__(self, **kw): diff --git a/pysollib/tk/toolbar.py b/pysollib/tk/toolbar.py index 8c63646a..d02bb061 100644 --- a/pysollib/tk/toolbar.py +++ b/pysollib/tk/toolbar.py @@ -40,9 +40,9 @@ from tkwidget import MfxTooltip from menubar import createToolbarMenu, MfxMenu -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class AbstractToolbarButton: def __init__(self, parent, toolbar, toolbar_name, position): @@ -147,9 +147,9 @@ class ToolbarLabel(Tkinter.Message): self.grid_forget() -# /*********************************************************************** -# // Note: Applications should call show/hide after constructor. -# ************************************************************************/ +# ************************************************************************ +# * Note: Applications should call show/hide after constructor. +# ************************************************************************ class PysolToolbarTk: diff --git a/pysollib/tk/wizarddialog.py b/pysollib/tk/wizarddialog.py index eba44dff..5592eb91 100644 --- a/pysollib/tk/wizarddialog.py +++ b/pysollib/tk/wizarddialog.py @@ -37,9 +37,9 @@ from pysollib.wizardpresets import presets from tkwidget import MfxDialog -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class WizardDialog(MfxDialog): def __init__(self, parent, title, app, **kw): diff --git a/pysollib/util.py b/pysollib/util.py index 19d17584..8de3f007 100644 --- a/pysollib/util.py +++ b/pysollib/util.py @@ -53,9 +53,9 @@ from settings import DATA_DIRS, TOOLKIT from mfxutil import Image -# /*********************************************************************** -# // constants -# ************************************************************************/ +# ************************************************************************ +# * constants +# ************************************************************************ # Suits values are 0-3. This maps to colors 0-1. SUITS = (_("Club"), _("Spade"), _("Heart"), _("Diamond")) @@ -95,9 +95,9 @@ if Image: IMAGE_EXTENSIONS = (".png", ".gif", ".jpg", ".ppm", ".bmp") -# /*********************************************************************** -# // DataLoader -# ************************************************************************/ +# ************************************************************************ +# * DataLoader +# ************************************************************************ class DataLoader: def __init__(self, argv0, filenames, path=[]): diff --git a/pysollib/winsystems/x11.py b/pysollib/winsystems/x11.py index a1789fab..9faa49f5 100644 --- a/pysollib/winsystems/x11.py +++ b/pysollib/winsystems/x11.py @@ -34,9 +34,9 @@ if USE_TILE: from common import base_init_root_window, BaseTkSettings, get_font_name -# /*********************************************************************** -# // Init root window -# ************************************************************************/ +# ************************************************************************ +# * Init root window +# ************************************************************************ def init_root_window(root, app): diff --git a/pysollib/wizardutil.py b/pysollib/wizardutil.py index f13f9350..fa75083f 100644 --- a/pysollib/wizardutil.py +++ b/pysollib/wizardutil.py @@ -30,9 +30,9 @@ from layout import Layout from wizardpresets import presets -# /*********************************************************************** -# // -# ************************************************************************/ +# ************************************************************************ +# * +# ************************************************************************ class WizSetting: def __init__(self, values_map, default, var_name,