mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Extract method.
This commit is contained in:
parent
4f2b28e017
commit
184d4e32db
27 changed files with 82 additions and 158 deletions
|
@ -3408,3 +3408,6 @@ in the current implementation.''') % version)
|
|||
def _startDealNumRowsAndDealSingleRow(self, n):
|
||||
self._startDealNumRows(n)
|
||||
self.s.talon.dealRow()
|
||||
|
||||
def _startAndDealRow(self):
|
||||
self._startDealNumRowsAndDealSingleRow(0)
|
||||
|
|
|
@ -117,8 +117,7 @@ class AcesUp(Game):
|
|||
#
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def isGameWon(self):
|
||||
if len(self.s.foundations[0].cards) != 48:
|
||||
|
@ -251,8 +250,7 @@ class PerpetualMotion(Game):
|
|||
#
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def shallHighlightMatch(self, stack1, card1, stack2, card2):
|
||||
return card1.rank == card2.rank
|
||||
|
@ -398,8 +396,7 @@ class TabbyCat(Game):
|
|||
l.defaultStackGroups()
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
shallHighlightMatch = Game._shallHighlightMatch_RKW
|
||||
|
||||
|
|
|
@ -96,8 +96,7 @@ class TamOShanter(Game):
|
|||
#
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def getAutoStacks(self, event=None):
|
||||
return ((), (), self.sg.dropstacks)
|
||||
|
@ -115,8 +114,7 @@ class AuldLangSyne(TamOShanter):
|
|||
|
||||
def startGame(self):
|
||||
self.s.talon.dealRow(rows=self.s.foundations, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
# ************************************************************************
|
||||
# * Strategy
|
||||
|
@ -506,8 +504,7 @@ class Amazons(AuldLangSyne):
|
|||
return cards
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -608,8 +605,7 @@ class Formic(TamOShanter):
|
|||
|
||||
def startGame(self):
|
||||
self.s.talon.dealRow(rows=self.s.foundations, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# register the game
|
||||
|
|
|
@ -82,8 +82,7 @@ class CastlesInSpain(Game):
|
|||
def startGame(self, flip=(0, 0, 0)):
|
||||
for f in flip:
|
||||
self.s.talon.dealRow(flip=f, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
shallHighlightMatch = Game._shallHighlightMatch_AC
|
||||
|
||||
|
|
|
@ -137,8 +137,7 @@ class MissMuffet(CurdsAndWhey):
|
|||
def startGame(self):
|
||||
self._dealNumRows(4)
|
||||
self.s.talon.dealRow(rows=[self.s.rows[0], self.s.rows[-1]], frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
class Nordic(MissMuffet):
|
||||
|
@ -273,8 +272,7 @@ class Arachnida(CurdsAndWhey):
|
|||
for i in range(4):
|
||||
self.s.talon.dealRow(flip=0, frames=0)
|
||||
self.s.talon.dealRow(rows=self.s.rows[:4], flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def canDealCards(self):
|
||||
if not CurdsAndWhey.canDealCards(self):
|
||||
|
@ -390,8 +388,7 @@ class TrustyTwelve(Game):
|
|||
l.defaultStackGroups()
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def fillStack(self, stack):
|
||||
if not stack.cards and stack in self.s.rows:
|
||||
|
|
|
@ -135,8 +135,7 @@ class Fan(Game):
|
|||
def startGame(self):
|
||||
for i in range(2):
|
||||
self.s.talon.dealRow(rows=self.s.rows[:17], frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
shallHighlightMatch = Game._shallHighlightMatch_SS
|
||||
|
||||
|
@ -693,8 +692,7 @@ class FascinationFan(Fan):
|
|||
def startGame(self):
|
||||
for i in range(2):
|
||||
self.s.talon.dealRow(rows=self.s.rows[:17], flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def redealCards(self):
|
||||
r0 = r1 = len(self.s.talon.cards)//3
|
||||
|
|
|
@ -157,8 +157,7 @@ class Glenwood(Game):
|
|||
self.base_rank = None
|
||||
for i in range(3):
|
||||
self.s.talon.dealRow(rows=self.s.reserves, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
#
|
||||
# game extras
|
||||
|
|
|
@ -579,8 +579,7 @@ class DiamondMine(Game):
|
|||
def startGame(self):
|
||||
for i in range(3):
|
||||
self.s.talon.dealRow(flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def isGameWon(self):
|
||||
if len(self.s.foundations[0].cards) != 13:
|
||||
|
@ -782,8 +781,7 @@ class ThirtyTwoCards(Vague):
|
|||
Vague.createGame(self, rows=4, columns=8)
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
|
|
@ -88,8 +88,7 @@ class Gypsy(Game):
|
|||
def startGame(self):
|
||||
for i in range(2):
|
||||
self.s.talon.dealRow(flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
shallHighlightMatch = Game._shallHighlightMatch_AC
|
||||
|
||||
|
@ -110,8 +109,7 @@ class Giant(Gypsy):
|
|||
Foundation_Class = Giant_Foundation
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -144,8 +142,7 @@ class Irmgard(Gypsy):
|
|||
r = self.s.rows
|
||||
for i in range(1, 5):
|
||||
self.s.talon.dealRow(rows=r[i:len(r)-i], flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -272,8 +269,7 @@ class MissMilligan(Gypsy):
|
|||
l.defaultStackGroups()
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
class ImperialGuards(MissMilligan):
|
||||
|
@ -304,8 +300,7 @@ class MilliganCell(MissMilligan):
|
|||
MissMilligan.createGame(self, reserves=4)
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -320,8 +315,7 @@ class MilliganHarp(Gypsy):
|
|||
def startGame(self, flip=0):
|
||||
for i in range(len(self.s.rows)):
|
||||
self.s.talon.dealRow(rows=self.s.rows[i+1:], flip=flip, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
class Carlton(MilliganHarp):
|
||||
|
@ -381,8 +375,7 @@ class Blockade(Gypsy):
|
|||
Gypsy.createGame(self, rows=12)
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def fillStack(self, stack):
|
||||
if stack in self.s.rows and not stack.cards and self.s.talon.cards:
|
||||
|
@ -509,8 +502,7 @@ class Surprise(Gypsy):
|
|||
def startGame(self):
|
||||
for i in range(1, 6):
|
||||
self.s.talon.dealRow(rows=self.s.rows[i:-i], flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -527,8 +519,7 @@ class Elba(Gypsy):
|
|||
def startGame(self):
|
||||
for i in range(4):
|
||||
self.s.talon.dealRow(flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -542,8 +533,7 @@ class Millie(Gypsy):
|
|||
Gypsy.createGame(self, playcards=24)
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -562,8 +552,7 @@ class Hypotenuse(Gypsy):
|
|||
def startGame(self, flip=0, reverse=1):
|
||||
for i in range(1, 10):
|
||||
self.s.talon.dealRow(rows=self.s.rows[:i], flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
class EternalTriangle(Hypotenuse):
|
||||
|
@ -571,8 +560,7 @@ class EternalTriangle(Hypotenuse):
|
|||
def startGame(self, flip=0, reverse=1):
|
||||
for i in range(1, 10):
|
||||
self.s.talon.dealRow(rows=self.s.rows[i:], frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
class RightTriangle_Talon(OpenStack, DealRowTalonStack):
|
||||
|
@ -746,8 +734,7 @@ class BrazilianPatience(Gypsy):
|
|||
def startGame(self, flip=0, reverse=1):
|
||||
for i in range(1, 10):
|
||||
self.s.talon.dealRow(rows=self.s.rows[i:], flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -801,8 +788,7 @@ class Leprechaun(Game):
|
|||
self.s.talon.dealRow(rows=self.s.reserves, flip=0, frames=0)
|
||||
self.s.talon.dealRow(flip=0, frames=0)
|
||||
self.s.talon.dealRow(flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
shallHighlightMatch = Game._shallHighlightMatch_AC
|
||||
|
||||
|
|
|
@ -106,8 +106,7 @@ class HeadsAndTails(Game):
|
|||
def startGame(self):
|
||||
for i in range(11):
|
||||
self.s.talon.dealRow(rows=self.s.reserves, frames=0, flip=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def fillStack(self, stack):
|
||||
if stack in self.s.rows and not stack.cards:
|
||||
|
|
|
@ -1008,8 +1008,7 @@ class DoubleDot(Klondike):
|
|||
|
||||
def startGame(self):
|
||||
self.s.talon.dealRow(rows=self.s.foundations, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
# def shallHighlightMatch(self, stack1, card1, stack2, card2):
|
||||
# return abs(card1.rank-card2.rank) == 2
|
||||
|
|
|
@ -153,8 +153,7 @@ class MonteCarlo(Game):
|
|||
#
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def getAutoStacks(self, event=None):
|
||||
return ((), (), self.sg.dropstacks)
|
||||
|
@ -614,8 +613,7 @@ class TheWish(Game):
|
|||
def startGame(self):
|
||||
for i in range(3):
|
||||
self.s.talon.dealRow(flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def fillStack(self, stack):
|
||||
if stack.cards:
|
||||
|
@ -832,8 +830,7 @@ class DoubletsII(Game):
|
|||
def startGame(self):
|
||||
for i in range(3):
|
||||
self.s.talon.dealRow(frames=0, flip=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def fillStack(self, stack):
|
||||
if stack in self.s.rows:
|
||||
|
@ -892,8 +889,7 @@ class RightAndLeft(Game):
|
|||
l.defaultStackGroups()
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# register the game
|
||||
|
|
|
@ -263,8 +263,7 @@ class PictureGallery(Game):
|
|||
|
||||
def startGame(self):
|
||||
self.s.talon.dealRow(rows=self.s.tableaux, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def isGameWon(self):
|
||||
if len(self.s.foundations[0].cards) != 8:
|
||||
|
|
|
@ -229,8 +229,7 @@ class RoyalMarriage(PushPin):
|
|||
|
||||
class Queens(PushPin):
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
|
|
@ -423,8 +423,7 @@ class Thirteens(Pyramid):
|
|||
l.defaultStackGroups()
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def fillStack(self, stack):
|
||||
if stack in self.s.rows:
|
||||
|
@ -522,8 +521,7 @@ class Elevens(Pyramid):
|
|||
l.defaultStackGroups()
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def fillStack(self, stack):
|
||||
old_state = self.enterState(self.S_FILL)
|
||||
|
@ -851,8 +849,7 @@ class Baroness(Pyramid):
|
|||
l.defaultStackGroups()
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
|
|
@ -644,8 +644,7 @@ class Twenty(Game):
|
|||
|
||||
def startGame(self):
|
||||
self.s.talon.dealRow(rows=self.s.foundations, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def fillStack(self, stack):
|
||||
if not stack.cards and stack in self.s.rows and self.s.talon.cards:
|
||||
|
|
|
@ -276,8 +276,7 @@ class PokerShuffle(PokerSquare):
|
|||
|
||||
def startGame(self):
|
||||
self.moveMove(27, self.s.talon, self.s.internals[0], frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def checkForWin(self):
|
||||
return 0
|
||||
|
|
|
@ -556,8 +556,7 @@ class FifteenPlus(AbstractTarockGame):
|
|||
self.s.talon.dealRow(flip=0, frames=0)
|
||||
for i in range(2):
|
||||
self.s.talon.dealRow(rows=self.s.rows[:15], flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def shallHighlightMatch(self, stack1, card1, stack2, card2):
|
||||
return (card1.suit == card2.suit and
|
||||
|
|
|
@ -160,8 +160,7 @@ class RelaxedSpider(Game):
|
|||
r = self.s.rows
|
||||
rows = (r[0], r[3], r[6], r[9])
|
||||
self.s.talon.dealRow(rows=rows, flip=flip, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
shallHighlightMatch = Game._shallHighlightMatch_RK
|
||||
getQuickPlayScore = Game._getSpiderQuickPlayScore
|
||||
|
@ -265,8 +264,7 @@ class Spiderette(Spider):
|
|||
def startGame(self):
|
||||
for i in range(1, len(self.s.rows)):
|
||||
self.s.talon.dealRow(rows=self.s.rows[i:], flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -285,8 +283,7 @@ class WillOTheWisp(Spiderette):
|
|||
def startGame(self):
|
||||
for i in range(2):
|
||||
self.s.talon.dealRow(flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -304,8 +301,7 @@ class SimpleSimon(Spider):
|
|||
def startGame(self):
|
||||
for i in (9, 8, 7, 6, 5, 4, 3):
|
||||
self.s.talon.dealRow(rows=self.s.rows[:i], frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
class SimpleSimonII(SimpleSimon):
|
||||
|
@ -353,8 +349,7 @@ class Scorpion(RelaxedSpider):
|
|||
for i in (4, 4, 4, 0, 0, 0):
|
||||
self.s.talon.dealRow(rows=self.s.rows[:i], flip=0, frames=0)
|
||||
self.s.talon.dealRow(rows=self.s.rows[i:], flip=1, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
shallHighlightMatch = Game._shallHighlightMatch_SS
|
||||
|
||||
|
@ -398,8 +393,7 @@ class TripleScorpion(Scorpion):
|
|||
for i in (5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0):
|
||||
self.s.talon.dealRow(rows=self.s.rows[:i], flip=0, frames=0)
|
||||
self.s.talon.dealRow(rows=self.s.rows[i:], flip=1, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -413,8 +407,7 @@ class Wasp(Scorpion):
|
|||
for i in (3, 3, 3, 0, 0, 0):
|
||||
self.s.talon.dealRow(rows=self.s.rows[:i], flip=0, frames=0)
|
||||
self.s.talon.dealRow(rows=self.s.rows[i:], flip=1, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -635,8 +628,7 @@ class Trillium(Game):
|
|||
self.s.talon.dealRow(frames=0, flip=0)
|
||||
self.s.talon.dealRow(frames=0)
|
||||
self.s.talon.dealRow(frames=0, flip=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
shallHighlightMatch = Game._shallHighlightMatch_AC
|
||||
|
||||
|
@ -896,8 +888,7 @@ class BigSpider(Spider):
|
|||
def startGame(self):
|
||||
for i in range(5):
|
||||
self.s.talon.dealRow(frames=0, flip=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
class BigSpider1Suit(BigSpider):
|
||||
|
@ -912,8 +903,7 @@ class Spider3x3(BigSpider):
|
|||
def startGame(self):
|
||||
for i in range(4):
|
||||
self.s.talon.dealRow(frames=0, flip=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
class GroundsForADivorce3Decks(BigSpider):
|
||||
|
@ -977,8 +967,7 @@ class ChineseSpider(Spider):
|
|||
def startGame(self):
|
||||
for i in range(5):
|
||||
self.s.talon.dealRow(frames=0, flip=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -1036,8 +1025,7 @@ class Spidike(RelaxedSpider):
|
|||
def startGame(self):
|
||||
for i in range(1, len(self.s.rows)):
|
||||
self.s.talon.dealRow(rows=self.s.rows[i:], frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
class FredsSpider(Spidike):
|
||||
|
@ -1135,8 +1123,7 @@ class ScorpionII(Scorpion):
|
|||
for i in (3, 3, 3, 0, 0, 0):
|
||||
self.s.talon.dealRow(rows=self.s.rows[:i], flip=0, frames=0)
|
||||
self.s.talon.dealRow(rows=self.s.rows[i:], flip=1, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -1217,8 +1204,7 @@ class FechtersGame(RelaxedSpider):
|
|||
self.s.talon.dealRow(flip=0, frames=0)
|
||||
self.s.talon.dealRow(flip=1, frames=0)
|
||||
self.s.talon.dealRow(flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
shallHighlightMatch = Game._shallHighlightMatch_AC
|
||||
|
||||
|
@ -1250,8 +1236,7 @@ class Bebop(Game):
|
|||
def startGame(self):
|
||||
for i in range(len(self.s.rows)-1):
|
||||
self.s.talon.dealRow(frames=0, flip=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def fillStack(self, stack):
|
||||
if stack in self.s.rows:
|
||||
|
|
|
@ -318,8 +318,7 @@ class RegalFamily(Game):
|
|||
l.defaultStackGroups()
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
shallHighlightMatch = Game._shallHighlightMatch_SS
|
||||
|
||||
|
|
|
@ -512,8 +512,7 @@ class Matrimony(Game):
|
|||
def startGame(self):
|
||||
self.s.talon.dealRow(rows=[self.s.foundations[3],
|
||||
self.s.foundations[7]], frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -701,8 +700,7 @@ class TwoRings(Game):
|
|||
|
||||
def startGame(self):
|
||||
self.s.talon.dealRow(rows=self.s.foundations, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -801,8 +799,7 @@ class Marshal(Game):
|
|||
l.defaultStackGroups()
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def fillStack(self, stack):
|
||||
if stack in self.s.rows and not stack.cards:
|
||||
|
@ -973,8 +970,7 @@ class Adela(Game):
|
|||
l.defaultStackGroups()
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def fillStack(self, stack):
|
||||
if stack in self.s.rows and not stack.cards:
|
||||
|
@ -1034,8 +1030,7 @@ class Toni(Game):
|
|||
|
||||
def startGame(self):
|
||||
self.s.talon.dealRow(rows=self.s.foundations, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -1181,8 +1176,7 @@ class Grandee(Game):
|
|||
l.defaultStackGroups()
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
shallHighlightMatch = Game._shallHighlightMatch_SS
|
||||
|
||||
|
@ -1274,8 +1268,7 @@ class DesertIsland(Game):
|
|||
|
||||
def startGame(self):
|
||||
self.s.talon.dealRow(rows=self.s.foundations, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def isGameWon(self):
|
||||
for s in self.s.foundations:
|
||||
|
|
|
@ -318,8 +318,7 @@ class LadiesBattle(Game):
|
|||
def startGame(self):
|
||||
self.s.talon.dealRow(rows=self.s.reserves, frames=0)
|
||||
self.s.talon.dealRow(rows=self.s.foundations, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def fillStack(self, stack):
|
||||
if stack in self.s.rows and not stack.cards:
|
||||
|
|
|
@ -1246,8 +1246,7 @@ class Dashavatara(Game):
|
|||
|
||||
def startGame(self):
|
||||
self.s.talon.dealRow(rows=self.s.tableaux, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def isGameWon(self):
|
||||
for stack in self.s.tableaux:
|
||||
|
|
|
@ -542,8 +542,7 @@ class GreatWall(AbstractFlowerGame):
|
|||
self.updateText()
|
||||
for i in range(15):
|
||||
self.s.talon.dealRow(flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
assert len(self.s.talon.cards) == 0
|
||||
|
||||
def fillStack(self, stack):
|
||||
|
|
|
@ -691,8 +691,7 @@ class FlowerArrangement(Game):
|
|||
|
||||
def startGame(self):
|
||||
self.s.talon.dealRow(rows=self.s.tableaux, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def isGameWon(self):
|
||||
for stack in self.s.tableaux:
|
||||
|
|
|
@ -1137,8 +1137,7 @@ class AshtaDikapala(Game):
|
|||
|
||||
def startGame(self):
|
||||
self.s.talon.dealRow(rows=self.s.tableaux, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def isGameWon(self):
|
||||
for stack in self.s.tableaux:
|
||||
|
|
|
@ -83,8 +83,7 @@ class Yukon(Game):
|
|||
self.s.talon.dealRow(rows=self.s.rows[i:], flip=0, frames=0)
|
||||
for i in range(4):
|
||||
self.s.talon.dealRow(rows=self.s.rows[1:], flip=1, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
def getHighlightPilesStacks(self):
|
||||
return ()
|
||||
|
@ -135,8 +134,7 @@ class Odessa(RussianSolitaire):
|
|||
self._dealNumRows(2)
|
||||
for i in range(2):
|
||||
self.s.talon.dealRow(rows=self.s.rows[1:6], frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -228,8 +226,7 @@ class ChineseDiscipline(Yukon):
|
|||
for i in (3, 3, 3, 4, 5, 6):
|
||||
self.s.talon.dealRow(rows=self.s.rows[:i], flip=1, frames=0)
|
||||
self.s.talon.dealRow(rows=self.s.rows[i:], flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
class ChineseSolitaire(ChineseDiscipline):
|
||||
|
@ -283,8 +280,7 @@ class RussianPoint(Rushdike):
|
|||
r = self.s.rows
|
||||
for i in (1, 1, 2, 2, 3, 3):
|
||||
self.s.talon.dealRow(rows=r[i:len(r)-i], flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
|
@ -355,8 +351,7 @@ class DoubleYukon(Yukon):
|
|||
# self.s.talon.dealRow(rows=self.s.rows, flip=0, frames=0)
|
||||
for i in range(5):
|
||||
self.s.talon.dealRow(flip=1, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
class DoubleRussianSolitaire(DoubleYukon):
|
||||
|
@ -379,8 +374,7 @@ class TripleYukon(Yukon):
|
|||
self.s.talon.dealRow(rows=self.s.rows[i:], flip=0, frames=0)
|
||||
for i in range(5):
|
||||
self.s.talon.dealRow(rows=self.s.rows, flip=1, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
|
||||
class TripleRussianSolitaire(TripleYukon):
|
||||
|
@ -698,8 +692,7 @@ class Wave(Game):
|
|||
def startGame(self):
|
||||
self.s.talon.dealRow(frames=0)
|
||||
self.s.talon.dealRow(frames=0, flip=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow()
|
||||
self._startAndDealRow()
|
||||
|
||||
shallHighlightMatch = Game._shallHighlightMatch_AC
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue