diff --git a/pysollib/game.py b/pysollib/game.py index ea0d94c1..e264a950 100644 --- a/pysollib/game.py +++ b/pysollib/game.py @@ -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) diff --git a/pysollib/games/acesup.py b/pysollib/games/acesup.py index 7a1f9c6c..8ec3f370 100644 --- a/pysollib/games/acesup.py +++ b/pysollib/games/acesup.py @@ -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 diff --git a/pysollib/games/auldlangsyne.py b/pysollib/games/auldlangsyne.py index 6c358823..323739b6 100644 --- a/pysollib/games/auldlangsyne.py +++ b/pysollib/games/auldlangsyne.py @@ -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 diff --git a/pysollib/games/bakersdozen.py b/pysollib/games/bakersdozen.py index 7a961dfd..1f943f43 100644 --- a/pysollib/games/bakersdozen.py +++ b/pysollib/games/bakersdozen.py @@ -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 diff --git a/pysollib/games/curdsandwhey.py b/pysollib/games/curdsandwhey.py index 8f20430e..eeccdfeb 100644 --- a/pysollib/games/curdsandwhey.py +++ b/pysollib/games/curdsandwhey.py @@ -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: diff --git a/pysollib/games/fan.py b/pysollib/games/fan.py index 108846d1..b7b15b2f 100644 --- a/pysollib/games/fan.py +++ b/pysollib/games/fan.py @@ -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 diff --git a/pysollib/games/glenwood.py b/pysollib/games/glenwood.py index 5ae8f26a..7c8a9a33 100644 --- a/pysollib/games/glenwood.py +++ b/pysollib/games/glenwood.py @@ -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 diff --git a/pysollib/games/golf.py b/pysollib/games/golf.py index 3c3902ff..248e8a2a 100644 --- a/pysollib/games/golf.py +++ b/pysollib/games/golf.py @@ -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() # ************************************************************************ diff --git a/pysollib/games/gypsy.py b/pysollib/games/gypsy.py index 4c1074e6..d028ea47 100644 --- a/pysollib/games/gypsy.py +++ b/pysollib/games/gypsy.py @@ -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 diff --git a/pysollib/games/headsandtails.py b/pysollib/games/headsandtails.py index cb8af194..b5029435 100644 --- a/pysollib/games/headsandtails.py +++ b/pysollib/games/headsandtails.py @@ -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: diff --git a/pysollib/games/klondike.py b/pysollib/games/klondike.py index cb0e4824..12185329 100644 --- a/pysollib/games/klondike.py +++ b/pysollib/games/klondike.py @@ -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 diff --git a/pysollib/games/montecarlo.py b/pysollib/games/montecarlo.py index 894847f5..260a93b2 100644 --- a/pysollib/games/montecarlo.py +++ b/pysollib/games/montecarlo.py @@ -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 diff --git a/pysollib/games/picturegallery.py b/pysollib/games/picturegallery.py index 7a4e7e15..f1ee5574 100644 --- a/pysollib/games/picturegallery.py +++ b/pysollib/games/picturegallery.py @@ -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: diff --git a/pysollib/games/pushpin.py b/pysollib/games/pushpin.py index 4293c91f..cb432a58 100644 --- a/pysollib/games/pushpin.py +++ b/pysollib/games/pushpin.py @@ -229,8 +229,7 @@ class RoyalMarriage(PushPin): class Queens(PushPin): def startGame(self): - self.startDealSample() - self.s.talon.dealRow() + self._startAndDealRow() # ************************************************************************ diff --git a/pysollib/games/pyramid.py b/pysollib/games/pyramid.py index f9103974..96088719 100644 --- a/pysollib/games/pyramid.py +++ b/pysollib/games/pyramid.py @@ -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() # ************************************************************************ diff --git a/pysollib/games/royalcotillion.py b/pysollib/games/royalcotillion.py index cdec0cfb..f218a383 100644 --- a/pysollib/games/royalcotillion.py +++ b/pysollib/games/royalcotillion.py @@ -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: diff --git a/pysollib/games/special/poker.py b/pysollib/games/special/poker.py index 743c734a..35fd1eac 100644 --- a/pysollib/games/special/poker.py +++ b/pysollib/games/special/poker.py @@ -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 diff --git a/pysollib/games/special/tarock.py b/pysollib/games/special/tarock.py index 4a7ee03c..50efb875 100644 --- a/pysollib/games/special/tarock.py +++ b/pysollib/games/special/tarock.py @@ -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 diff --git a/pysollib/games/spider.py b/pysollib/games/spider.py index 5bf6d33f..5bccaf02 100644 --- a/pysollib/games/spider.py +++ b/pysollib/games/spider.py @@ -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: diff --git a/pysollib/games/sthelena.py b/pysollib/games/sthelena.py index ad2295f2..7304a055 100644 --- a/pysollib/games/sthelena.py +++ b/pysollib/games/sthelena.py @@ -318,8 +318,7 @@ class RegalFamily(Game): l.defaultStackGroups() def startGame(self): - self.startDealSample() - self.s.talon.dealRow() + self._startAndDealRow() shallHighlightMatch = Game._shallHighlightMatch_SS diff --git a/pysollib/games/sultan.py b/pysollib/games/sultan.py index 9debdc6d..f8601f45 100644 --- a/pysollib/games/sultan.py +++ b/pysollib/games/sultan.py @@ -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: diff --git a/pysollib/games/tournament.py b/pysollib/games/tournament.py index b176b207..7e6dd1bb 100644 --- a/pysollib/games/tournament.py +++ b/pysollib/games/tournament.py @@ -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: diff --git a/pysollib/games/ultra/dashavatara.py b/pysollib/games/ultra/dashavatara.py index 7ea8a3b0..0ce2c9a7 100644 --- a/pysollib/games/ultra/dashavatara.py +++ b/pysollib/games/ultra/dashavatara.py @@ -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: diff --git a/pysollib/games/ultra/hanafuda.py b/pysollib/games/ultra/hanafuda.py index be87d80d..33561e91 100644 --- a/pysollib/games/ultra/hanafuda.py +++ b/pysollib/games/ultra/hanafuda.py @@ -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): diff --git a/pysollib/games/ultra/hanafuda1.py b/pysollib/games/ultra/hanafuda1.py index 41d851cf..312a1a90 100644 --- a/pysollib/games/ultra/hanafuda1.py +++ b/pysollib/games/ultra/hanafuda1.py @@ -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: diff --git a/pysollib/games/ultra/mughal.py b/pysollib/games/ultra/mughal.py index 30220e87..2124bf08 100644 --- a/pysollib/games/ultra/mughal.py +++ b/pysollib/games/ultra/mughal.py @@ -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: diff --git a/pysollib/games/yukon.py b/pysollib/games/yukon.py index 2f49af8f..bf904fbb 100644 --- a/pysollib/games/yukon.py +++ b/pysollib/games/yukon.py @@ -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