diff --git a/pysollib/game.py b/pysollib/game.py index 4bd0cca9..c75cbe07 100644 --- a/pysollib/game.py +++ b/pysollib/game.py @@ -3400,3 +3400,7 @@ in the current implementation.''') % version) def _dealNumRows(self, n): for i in range(n): self.s.talon.dealRow(frames=0) + + def _startDealNumRows(self, n): + self._dealNumRows(n) + self.startDealSample() diff --git a/pysollib/games/bakersgame.py b/pysollib/games/bakersgame.py index fdf0c3a6..2962bf26 100644 --- a/pysollib/games/bakersgame.py +++ b/pysollib/games/bakersgame.py @@ -109,8 +109,7 @@ class EightOff(KingOnlyBakersGame): # def startGame(self): - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() r = self.s.reserves self.s.talon.dealRow(rows=[r[0], r[2], r[4], r[6]]) @@ -160,8 +159,7 @@ class SeahavenTowers(KingOnlyBakersGame): # def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() self.s.talon.dealRow(rows=(self.s.reserves[1:3])) @@ -225,8 +223,7 @@ class Tuxedo(Game): l.defaultStackGroups() def startGame(self): - self._dealNumRows(6) - self.startDealSample() + self._startDealNumRows(6) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.rows[::3]) @@ -261,8 +258,7 @@ class Penguin(Tuxedo): self.flipMove(self.s.talon) self.moveMove(1, self.s.talon, to_stack, frames=0) # deal rows - self._dealNumRows(6) - self.startDealSample() + self._startDealNumRows(6) self.s.talon.dealRow() def _restoreGameHook(self, game): diff --git a/pysollib/games/beleagueredcastle.py b/pysollib/games/beleagueredcastle.py index aa7bcb45..e97bc3b4 100644 --- a/pysollib/games/beleagueredcastle.py +++ b/pysollib/games/beleagueredcastle.py @@ -131,8 +131,7 @@ class StreetsAndAlleys(Game): # def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) for i in range(3): self.s.talon.dealRowAvail() @@ -150,8 +149,7 @@ class BeleagueredCastle(StreetsAndAlleys): cards, lambda c: (c.rank == 0, c.suit)) def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) for i in range(2): self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.foundations) @@ -232,8 +230,7 @@ class Fortress(Game): # def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) for i in range(3): self.s.talon.dealRowAvail() @@ -282,8 +279,7 @@ class Bastion(Game): # def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) for i in range(2): self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.reserves) @@ -296,8 +292,7 @@ class TenByOne(Bastion): Bastion.createGame(self, reserves=1) def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) for i in range(3): self.s.talon.dealRowAvail() @@ -532,8 +527,7 @@ class Zerline(Game): # def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() self.s.talon.dealCards() @@ -591,8 +585,7 @@ class Chequers(Fortress): l.defaultStackGroups() def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() def fillStack(self, stack): @@ -652,8 +645,7 @@ class CastleOfIndolence(Game): def startGame(self): for i in range(13): self.s.talon.dealRow(rows=self.s.reserves, frames=0) - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() self.s.talon.dealRow() self.s.talon.dealRowAvail() @@ -777,8 +769,7 @@ class Lightweight(StreetsAndAlleys): def startGame(self): self.s.talon.dealRow(rows=self.s.foundations, frames=0) - self._dealNumRows(self.DEAL[0]) - self.startDealSample() + self._startDealNumRows(self.DEAL[0]) for i in range(self.DEAL[1]): self.s.talon.dealRowAvail() @@ -860,8 +851,7 @@ class Soother(Game): l.defaultStackGroups() def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() self.s.talon.dealCards() diff --git a/pysollib/games/bisley.py b/pysollib/games/bisley.py index ea1e1c80..b94e4863 100644 --- a/pysollib/games/bisley.py +++ b/pysollib/games/bisley.py @@ -90,8 +90,7 @@ class Bisley(Game): # def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.foundations[::2]) @@ -190,8 +189,7 @@ class Gloria(Game): l.defaultAll() def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.foundations[1::2]) @@ -238,8 +236,7 @@ class Realm(Game): l.defaultAll() def startGame(self): - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() self.s.talon.dealRowAvail() @@ -342,8 +339,7 @@ class BoardPatience(Game): self.flipMove(self.s.talon) self.moveMove(1, self.s.talon, self.s.foundations[n], frames=0) # deal to rows - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() self.s.talon.dealRowAvail() @@ -406,8 +402,7 @@ class Cringle(Game): l.defaultStackGroups() def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() self.s.talon.dealCards() diff --git a/pysollib/games/bristol.py b/pysollib/games/bristol.py index 3e2265a2..9c43b725 100644 --- a/pysollib/games/bristol.py +++ b/pysollib/games/bristol.py @@ -388,8 +388,7 @@ class Gotham(NewYork): RowStack_Class = StackWrapper(Gotham_RowStack, base_rank=ANY_RANK, mod=13) def startGame(self): - self.s.talon.dealRow(frames=0) - self.s.talon.dealRow(frames=0) + self._dealNumRows(2) NewYork.startGame(self) shallHighlightMatch = Game._shallHighlightMatch_RKW diff --git a/pysollib/games/buffalobill.py b/pysollib/games/buffalobill.py index a7a48a75..6432770c 100644 --- a/pysollib/games/buffalobill.py +++ b/pysollib/games/buffalobill.py @@ -90,8 +90,7 @@ class BuffaloBill(Game): # def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() diff --git a/pysollib/games/calculation.py b/pysollib/games/calculation.py index 0a5dbdf1..2bfaabe1 100644 --- a/pysollib/games/calculation.py +++ b/pysollib/games/calculation.py @@ -323,8 +323,7 @@ class One234(Calculation): return cards def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.foundations) @@ -410,8 +409,7 @@ class SeniorWrangler(Game): def startGame(self): self.s.talon.dealRow(rows=self.s.foundations[:8], frames=0) - self._dealNumRows(11) - self.startDealSample() + self._startDealNumRows(11) self.s.talon.dealRow() diff --git a/pysollib/games/canfield.py b/pysollib/games/canfield.py index 73e28a80..5723394f 100644 --- a/pysollib/games/canfield.py +++ b/pysollib/games/canfield.py @@ -805,8 +805,7 @@ class Skippy(Canfield): for s in self.s.rows: s.cap.base_rank = row_base_rank # - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() self.s.talon.dealCards() diff --git a/pysollib/games/capricieuse.py b/pysollib/games/capricieuse.py index 6b94dd18..60d6913c 100644 --- a/pysollib/games/capricieuse.py +++ b/pysollib/games/capricieuse.py @@ -90,8 +90,7 @@ class Capricieuse(Game): # def startGame(self): - self._dealNumRows(7) - self.startDealSample() + self._startDealNumRows(7) self.s.talon.dealRow() self.s.talon.dealRow(self.s.foundations) @@ -153,8 +152,7 @@ class Strata(Game): l.defaultStackGroups() def startGame(self): - self._dealNumRows(7) - self.startDealSample() + self._startDealNumRows(7) self.s.talon.dealRow() def redealCards(self): @@ -175,8 +173,7 @@ class Fifteen(Capricieuse): Capricieuse.createGame(self, rows=15, round_text=False) def startGame(self): - self._dealNumRows(6) - self.startDealSample() + self._startDealNumRows(6) self.s.talon.dealRowAvail() def _shuffleHook(self, cards): diff --git a/pysollib/games/curdsandwhey.py b/pysollib/games/curdsandwhey.py index 98a62949..d0472582 100644 --- a/pysollib/games/curdsandwhey.py +++ b/pysollib/games/curdsandwhey.py @@ -115,8 +115,7 @@ class CurdsAndWhey(Game): # def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() def isGameWon(self): diff --git a/pysollib/games/fan.py b/pysollib/games/fan.py index cb791043..b8d74286 100644 --- a/pysollib/games/fan.py +++ b/pysollib/games/fan.py @@ -384,8 +384,7 @@ class Trefoil(LaBelleLucie): cards, lambda c: (c.rank == 0, c.suit)) def startGame(self): - self._dealNumRows(2) - self.startDealSample() + self._startDealNumRows(2) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.foundations) @@ -464,9 +463,7 @@ class Intelligence(Fan): def startGame(self): talon = self.s.talon - for i in range(2): - talon.dealRow(frames=0) - self.startDealSample() + self._startDealNumRows(2) talon.dealRow() # move all remaining cards to the reserve self.moveMove(len(talon.cards), talon, self.s.reserves[0], frames=0) @@ -567,8 +564,7 @@ class CloverLeaf(Game): # def startGame(self): - self._dealNumRows(2) - self.startDealSample() + self._startDealNumRows(2) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.foundations) @@ -607,8 +603,7 @@ class BoxFan(Fan): Fan.createGame(self, rows=(4, 4, 4, 4)) def startGame(self): - self._dealNumRows(2) - self.startDealSample() + self._startDealNumRows(2) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.foundations) @@ -786,8 +781,7 @@ class Crescent(Game): def startGame(self): self.s.talon.dealRow(rows=self.s.foundations, frames=0) - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() shallHighlightMatch = Game._shallHighlightMatch_SSW @@ -806,8 +800,7 @@ class School(Fan): Fan.createGame(self, rows=(4, 4, 4, 4), playcards=10, texts=True) def startGame(self): - self._dealNumRows(2) - self.startDealSample() + self._startDealNumRows(2) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.foundations) @@ -937,8 +930,7 @@ class ForestGlade(Game): l.defaultStackGroups() def startGame(self): - self._dealNumRows(2) - self.startDealSample() + self._startDealNumRows(2) self.s.talon.dealRow() shallHighlightMatch = Game._shallHighlightMatch_SS diff --git a/pysollib/games/fortythieves.py b/pysollib/games/fortythieves.py index df652c34..99ec9631 100644 --- a/pysollib/games/fortythieves.py +++ b/pysollib/games/fortythieves.py @@ -616,8 +616,7 @@ class Octave(Game): def startGame(self): self.s.talon.dealRow(rows=self.s.foundations, frames=0) - self._dealNumRows(2) - self.startDealSample() + self._startDealNumRows(2) self.s.talon.dealRow() self.s.talon.dealCards() # deal first card to WasteStack @@ -805,8 +804,7 @@ class Squadron(FortyThieves): def startGame(self): self.s.talon.dealRow(rows=self.s.reserves, frames=0) - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() self.s.talon.dealCards() # deal first card to WasteStack @@ -1046,8 +1044,7 @@ class FortyNine(Interchange): RowStack_Class = FortyNine_RowStack def startGame(self): - self._dealNumRows(6) - self.startDealSample() + self._startDealNumRows(6) self.s.talon.dealRow() self.s.talon.dealCards() @@ -1146,8 +1143,7 @@ class Floradora(Game): l.defaultStackGroups() def startGame(self): - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() self.s.talon.dealCards() diff --git a/pysollib/games/freecell.py b/pysollib/games/freecell.py index 43d8f9ca..37aaf511 100644 --- a/pysollib/games/freecell.py +++ b/pysollib/games/freecell.py @@ -96,8 +96,7 @@ class FreeCell(Game): # def startGame(self): - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() r = self.s.rows # self.s.talon.dealRow(rows=(r[0], r[2], r[4], r[6])) @@ -124,8 +123,7 @@ class ForeCell(FreeCell): Solver_Class = FreeCellSolverWrapper(esf='kings') def startGame(self): - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.reserves) @@ -161,8 +159,7 @@ class Stalactites(FreeCell): FreeCell.createGame(self, reserves=2) def startGame(self): - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.foundations) self._restoreGameHook(None) @@ -221,8 +218,7 @@ class DoubleFreecell(FreeCell): cards, lambda c: (c.rank == ACE and c.deck == 0, c.suit)) def startGame(self): - self._dealNumRows(9) - self.startDealSample() + self._startDealNumRows(9) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.foundations) @@ -274,8 +270,7 @@ class TripleFreecell(FreeCell): # def startGame(self): - self._dealNumRows(11) - self.startDealSample() + self._startDealNumRows(11) self.s.talon.dealRow() @@ -284,8 +279,7 @@ class Cell11(TripleFreecell): TripleFreecell.createGame(self, rows=12, reserves=11) def startGame(self): - self._dealNumRows(12) - self.startDealSample() + self._startDealNumRows(12) self.s.talon.dealRow(rows=self.s.rows[1:-1]) self.s.talon.dealRow(rows=[self.s.reserves[0], self.s.reserves[-1]]) @@ -297,8 +291,7 @@ class BigCell(TripleFreecell): TripleFreecell.createGame(self, rows=13, reserves=4) def startGame(self): - self._dealNumRows(11) - self.startDealSample() + self._startDealNumRows(11) self.s.talon.dealRow() @@ -358,8 +351,7 @@ class SevenByFour(FreeCell): FreeCell.createGame(self, rows=7) def startGame(self): - self._dealNumRows(6) - self.startDealSample() + self._startDealNumRows(6) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.rows[:3]) @@ -415,8 +407,7 @@ class Clink(FreeCell): l.defaultAll() def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.reserves) @@ -441,8 +432,7 @@ class Repair(FreeCell): FreeCell.createGame(self, rows=10, reserves=4, playcards=26) def startGame(self): - self._dealNumRows(9) - self.startDealSample() + self._startDealNumRows(9) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.reserves) @@ -523,8 +513,7 @@ class OceanTowers(TripleFreecell): TripleFreecell.createGame(self, rows=14, reserves=8, playcards=20) def startGame(self): - self._dealNumRows(6) - self.startDealSample() + self._startDealNumRows(6) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.reserves[1:-1]) @@ -583,8 +572,7 @@ class Headquarters(Game): l.defaultStackGroups() def startGame(self): - self._dealNumRows(12) - self.startDealSample() + self._startDealNumRows(12) self.s.talon.dealRow() shallHighlightMatch = Game._shallHighlightMatch_AC @@ -604,8 +592,7 @@ class CanCan(FreeCell): FreeCell.createGame(self, rows=13, reserves=3) def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow(rows=self.s.reserves) self.s.talon.dealRowAvail() @@ -650,8 +637,7 @@ class Limpopo(Game): l.defaultStackGroups() def startGame(self): - self._dealNumRows(12) - self.startDealSample() + self._startDealNumRows(12) self.s.talon.dealRow() shallHighlightMatch = Game._shallHighlightMatch_AC diff --git a/pysollib/games/glenwood.py b/pysollib/games/glenwood.py index b4b40c11..5ae8f26a 100644 --- a/pysollib/games/glenwood.py +++ b/pysollib/games/glenwood.py @@ -325,8 +325,7 @@ class DoubleFives(Glenwood): def startGame(self): self.base_rank = None - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.reserves[-2:]) diff --git a/pysollib/games/golf.py b/pysollib/games/golf.py index 864f05ff..7259b708 100644 --- a/pysollib/games/golf.py +++ b/pysollib/games/golf.py @@ -180,8 +180,7 @@ class Golf(Game): # def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() self.s.talon.dealCards() # deal first card to WasteStack @@ -378,8 +377,7 @@ class BlackHole(Game): cards, lambda c: (c.id == 13, c.suit), 1) def startGame(self): - self._dealNumRows(2) - self.startDealSample() + self._startDealNumRows(2) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.foundations) @@ -449,8 +447,7 @@ class FourLeafClovers(Game): l.defaultStackGroups() def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() shallHighlightMatch = Game._shallHighlightMatch_RKW @@ -498,8 +495,7 @@ class AllInARow(BlackHole): l.defaultStackGroups() def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() @@ -632,8 +628,7 @@ class Dolphin(Game): l.defaultAll() def startGame(self): - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() self.s.talon.dealRowAvail() @@ -644,8 +639,7 @@ class DoubleDolphin(Dolphin): Dolphin.createGame(self, rows=10, reserves=5, playcards=10) def startGame(self): - self._dealNumRows(9) - self.startDealSample() + self._startDealNumRows(9) self.s.talon.dealRow() self.s.talon.dealRowAvail() @@ -697,8 +691,7 @@ class Waterfall(Game): l.defaultStackGroups() def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() def updateText(self): @@ -1021,8 +1014,7 @@ class NapoleonTakesMoscow(Game, FirTree_GameMethods): def startGame(self): self.s.talon.dealRow(rows=self.s.reserves, frames=0) - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() self.s.talon.dealCards() @@ -1035,8 +1027,7 @@ class NapoleonLeavesMoscow(NapoleonTakesMoscow): def startGame(self): self.s.talon.dealRow(rows=self.s.reserves, frames=0) - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() self.s.talon.dealCards() @@ -1077,8 +1068,7 @@ class Flake(Game): l.defaultStackGroups() def startGame(self): - self._dealNumRows(7) - self.startDealSample() + self._startDealNumRows(7) self.s.talon.dealRow() self.s.talon.dealRowAvail() @@ -1090,8 +1080,7 @@ class Flake2Decks(Flake): Flake.createGame(self, rows=8, playcards=22) def startGame(self): - self._dealNumRows(12) - self.startDealSample() + self._startDealNumRows(12) self.s.talon.dealRow() @@ -1129,8 +1118,7 @@ class Beacon(Game): l.defaultStackGroups() def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() def fillStack(self, stack): diff --git a/pysollib/games/gypsy.py b/pysollib/games/gypsy.py index 2b359e5c..c806167c 100644 --- a/pysollib/games/gypsy.py +++ b/pysollib/games/gypsy.py @@ -208,8 +208,7 @@ class DieRussische(Gypsy): cards, lambda c: (c.rank == 0, c.suit), 1) def startGame(self): - self._dealNumRows(6) - self.startDealSample() + self._startDealNumRows(6) for i in range(3): self.s.talon.dealRow() c = self.s.talon.cards[-1] @@ -291,8 +290,7 @@ class Nomad(MissMilligan): ReserveStack_Class = ReserveStack def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() @@ -405,8 +403,7 @@ class PhantomBlockade(Gypsy): Gypsy.createGame(self, rows=13, playcards=24) def startGame(self): - self._dealNumRows(2) - self.startDealSample() + self._startDealNumRows(2) self.s.talon.dealRow() @@ -717,8 +714,7 @@ class Flamenco(Gypsy): def startGame(self): self.s.talon.dealRow(rows=self.s.foundations, frames=0) - self._dealNumRows(2) - self.startDealSample() + self._startDealNumRows(2) self.s.talon.dealRow() @@ -734,8 +730,7 @@ class Eclipse(Gypsy): Gypsy.createGame(self, rows=13) def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() shallHighlightMatch = Game._shallHighlightMatch_SS @@ -882,8 +877,7 @@ class LockedCards(Game): def startGame(self, rows=5): self.s.talon.dealRow(rows=self.s.reserves, flip=0, frames=0) - self._dealNumRows(rows-1) - self.startDealSample() + self._startDealNumRows(rows-1) self.s.talon.dealRow() self.s.talon.dealCards() @@ -967,8 +961,7 @@ class Thirty(Game): l.defaultAll() def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.reserves) diff --git a/pysollib/games/harp.py b/pysollib/games/harp.py index b93f8532..b3dbcb15 100644 --- a/pysollib/games/harp.py +++ b/pysollib/games/harp.py @@ -275,8 +275,7 @@ class Delivery(BigDeal): shallHighlightMatch = Game._shallHighlightMatch_SS def startGame(self): - self._dealNumRows(2) - self.startDealSample() + self._startDealNumRows(2) self.s.talon.dealRow() self.s.talon.dealCards() # deal first card to WasteStack @@ -329,8 +328,7 @@ class Brush(DoubleKlondike): DoubleKlondike.createGame(self, rows=10, max_rounds=1) def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() self.s.talon.dealCards() # deal first card to WasteStack diff --git a/pysollib/games/katzenschwanz.py b/pysollib/games/katzenschwanz.py index 8e1fb1a4..eca3cef2 100644 --- a/pysollib/games/katzenschwanz.py +++ b/pysollib/games/katzenschwanz.py @@ -388,8 +388,7 @@ class Deep(DerKatzenschwanz): return DerKatzenschwanz.createGame(self, rows=8, reserves=8) def startGame(self): - self._dealNumRows(12) - self.startDealSample() + self._startDealNumRows(12) self.s.talon.dealRow() diff --git a/pysollib/games/klondike.py b/pysollib/games/klondike.py index cff5e772..c655d257 100644 --- a/pysollib/games/klondike.py +++ b/pysollib/games/klondike.py @@ -371,8 +371,7 @@ class AmericanCanister(Klondike): Klondike.createGame(self, max_rounds=1, rows=8, waste=0, texts=0) def startGame(self): - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.rows[2:6]) @@ -425,8 +424,7 @@ class EightTimesEight(Klondike): Klondike.createGame(self, rows=8) def startGame(self): - self._dealNumRows(7) - self.startDealSample() + self._startDealNumRows(7) self.s.talon.dealRow() self.s.talon.dealCards() # deal first card to WasteStack @@ -620,8 +618,7 @@ class Brigade(Raglan): RESERVES = (4, 4, 4, 1) def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.reserves) self.s.talon.dealRow(rows=self.s.foundations) @@ -833,8 +830,7 @@ class Phoenix(Klondike): lay.defaultStackGroups() def startGame(self): - self._dealNumRows(6) - self.startDealSample() + self._startDealNumRows(6) self.s.talon.dealRow(rows=self.s.reserves) @@ -865,8 +861,7 @@ class Lanes(Klondike): def startGame(self): self.s.talon.dealRow(rows=self.s.foundations, frames=0) - self._dealNumRows(2) - self.startDealSample() + self._startDealNumRows(2) self.s.talon.dealRow() self.s.talon.dealCards() # deal first card to WasteStack @@ -920,8 +915,7 @@ class Q_C_(Klondike): lay.createRoundText(self.s.talon, 'sss') def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() while self.s.talon.cards: self.s.talon.dealCards() # deal first card to WasteStack @@ -1114,10 +1108,7 @@ class BigForty(Klondike): Klondike.createGame(self, rows=10) def startGame(self): - self.s.talon.dealRow(frames=0) - self.s.talon.dealRow(frames=0) - self.s.talon.dealRow(frames=0) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() self.s.talon.dealCards() @@ -1265,10 +1256,7 @@ class LuckyThirteen(Game): lay.defaultStackGroups() def startGame(self): - self.s.talon.dealRow(frames=0) - self.s.talon.dealRow(frames=0) - self.s.talon.dealRow(frames=0) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() shallHighlightMatch = Game._shallHighlightMatch_RK @@ -1336,8 +1324,7 @@ class BigBertha(Game): lay.defaultStackGroups() def startGame(self): - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.reserves) diff --git a/pysollib/games/montecarlo.py b/pysollib/games/montecarlo.py index d5cd0671..0aeb97da 100644 --- a/pysollib/games/montecarlo.py +++ b/pysollib/games/montecarlo.py @@ -425,8 +425,7 @@ class Fourteen(Game): # def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.rows[:4]) @@ -634,8 +633,7 @@ class TheWishOpen(TheWish): pass def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() # ************************************************************************ diff --git a/pysollib/games/napoleon.py b/pysollib/games/napoleon.py index f2c14410..7e21a903 100644 --- a/pysollib/games/napoleon.py +++ b/pysollib/games/napoleon.py @@ -343,8 +343,7 @@ class Bonaparte(TheLittleCorporal): TheLittleCorporal.createGame(self, rows=8) def startGame(self): - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() self.s.talon.dealBaseCards(ncards=4) @@ -405,8 +404,7 @@ class BusyCards(Game): def startGame(self): self.s.talon.dealRow(rows=self.s.foundations, frames=0) - self._dealNumRows(7) - self.startDealSample() + self._startDealNumRows(7) self.s.talon.dealRow() shallHighlightMatch = Game._shallHighlightMatch_SS diff --git a/pysollib/games/numerica.py b/pysollib/games/numerica.py index 0a95af17..52c127a9 100644 --- a/pysollib/games/numerica.py +++ b/pysollib/games/numerica.py @@ -979,8 +979,7 @@ class Aglet(Game): def startGame(self): self.s.talon.dealRow(rows=self.s.foundations, frames=0) - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRowAvail() self.s.talon.dealRowAvail() diff --git a/pysollib/games/osmosis.py b/pysollib/games/osmosis.py index 210203a7..b9dba059 100644 --- a/pysollib/games/osmosis.py +++ b/pysollib/games/osmosis.py @@ -243,8 +243,7 @@ class OpenPeek(Game): # def startGame(self): - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow(rows=self.s.reserves) diff --git a/pysollib/games/pileon.py b/pysollib/games/pileon.py index e7e1037d..28df8f69 100644 --- a/pysollib/games/pileon.py +++ b/pysollib/games/pileon.py @@ -202,8 +202,7 @@ class Quartets(Foursome): Foursome.createGame(self, rows=8, texts=False) def startGame(self): - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() self.s.talon.dealRowAvail() @@ -367,8 +366,7 @@ class Footling(FourByFour): l.defaultStackGroups() def startGame(self): - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() self.s.talon.dealRowAvail() @@ -380,8 +378,7 @@ class DoubleFootling(Footling): Footling.createGame(self, rows=10, reserves=5, playcards=18) def startGame(self): - self._dealNumRows(9) - self.startDealSample() + self._startDealNumRows(9) self.s.talon.dealRow() self.s.talon.dealRowAvail() diff --git a/pysollib/games/pyramid.py b/pysollib/games/pyramid.py index eac2a636..f9103974 100644 --- a/pysollib/games/pyramid.py +++ b/pysollib/games/pyramid.py @@ -724,9 +724,7 @@ class TripleAlliance(Game): l.defaultStackGroups() def startGame(self): - self.s.talon.dealRow(frames=0) - self.s.talon.dealRow(frames=0) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRowAvail() def fillStack(self, stack): diff --git a/pysollib/games/royalcotillion.py b/pysollib/games/royalcotillion.py index c92f1528..cdec0cfb 100644 --- a/pysollib/games/royalcotillion.py +++ b/pysollib/games/royalcotillion.py @@ -703,9 +703,7 @@ class ThreePirates(Game): l.defaultStackGroups() def startGame(self): - for i in (0, 1, 2): - self.s.talon.dealRow(frames=0) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() self.s.talon.dealCards() diff --git a/pysollib/games/sanibel.py b/pysollib/games/sanibel.py index 013a591b..33536a45 100644 --- a/pysollib/games/sanibel.py +++ b/pysollib/games/sanibel.py @@ -54,8 +54,7 @@ class Sanibel(Gypsy): def startGame(self): for i in range(3): self.s.talon.dealRow(flip=0, frames=0) - self._dealNumRows(6) - self.startDealSample() + self._startDealNumRows(6) self.s.talon.dealRow() self.s.talon.dealCards() # deal first card to WasteStack diff --git a/pysollib/games/special/tarock.py b/pysollib/games/special/tarock.py index af42636f..4a7ee03c 100644 --- a/pysollib/games/special/tarock.py +++ b/pysollib/games/special/tarock.py @@ -424,8 +424,7 @@ class Pagat(AbstractTarockGame): def startGame(self): assert len(self.s.talon.cards) == 78 - self._dealNumRows(6) - self.startDealSample() + self._startDealNumRows(6) self.s.talon.dealRow(rows=self.s.rows[3:9]) def shallHighlightMatch(self, stack1, card1, stack2, card2): @@ -493,8 +492,7 @@ class Skiz(AbstractTarockGame): def startGame(self): assert len(self.s.talon.cards) == 78 - self._dealNumRows(6) - self.startDealSample() + self._startDealNumRows(6) self.s.talon.dealRow(rows=self.s.rows[3:9]) def shallHighlightMatch(self, stack1, card1, stack2, card2): diff --git a/pysollib/games/spider.py b/pysollib/games/spider.py index c565d3fe..af78697c 100644 --- a/pysollib/games/spider.py +++ b/pysollib/games/spider.py @@ -235,8 +235,7 @@ class GroundsForADivorce(RelaxedSpider): RelaxedSpider.createGame(self, playcards=22) def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() shallHighlightMatch = Game._shallHighlightMatch_RKW @@ -253,8 +252,7 @@ class GrandmothersGame(RelaxedSpider): RelaxedSpider.createGame(self, playcards=22) def startGame(self): - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() @@ -540,8 +538,7 @@ class MrsMop(RelaxedSpider): RelaxedSpider.createGame(self, rows=13, playcards=24, texts=0) def startGame(self): - self._dealNumRows(7) - self.startDealSample() + self._startDealNumRows(7) self.s.talon.dealRow() @@ -601,8 +598,7 @@ class Cicely(Game): def startGame(self): self.s.talon.dealRow(rows=self.s.reserves, frames=0) - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() shallHighlightMatch = Game._shallHighlightMatch_SS @@ -724,8 +720,7 @@ class Chelicera(Game): l.defaultStackGroups() def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) for i in range(3): self.s.talon.dealRow(rows=self.s.rows[4:]) @@ -815,8 +810,7 @@ class SpiderWeb(RelaxedSpider): l.defaultStackGroups() def startGame(self): - self._dealNumRows(2) - self.startDealSample() + self._startDealNumRows(2) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.rows[:3]) @@ -1006,8 +1000,7 @@ class York(RelaxedSpider): RelaxedSpider.createGame(self, rows=12, playcards=26, texts=0) def startGame(self): - self._dealNumRows(8) - self.startDealSample() + self._startDealNumRows(8) self.s.talon.dealRow(rows=self.s.rows[2:-2]) shallHighlightMatch = Game._shallHighlightMatch_RKW @@ -1019,8 +1012,7 @@ class BigYork(York): RelaxedSpider.createGame(self, rows=14, playcards=26, texts=0) def startGame(self): - self._dealNumRows(10) - self.startDealSample() + self._startDealNumRows(10) self.s.talon.dealRow() self.s.talon.dealRow(rows=[self.s.rows[0], self.s.rows[-1]]) @@ -1059,8 +1051,7 @@ class FredsSpider(Spidike): Spidike.createGame(self, rows=10, playcards=23) def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() @@ -1136,8 +1127,7 @@ class Incompatibility(Spidike): Spidike.createGame(self, rows=10) def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() @@ -1387,8 +1377,7 @@ class TheJollyRoger(Game): l.defaultStackGroups() def startGame(self): - self._dealNumRows(2) - self.startDealSample() + self._startDealNumRows(2) self.s.talon.dealRow() def shallHighlightMatch(self, stack1, card1, stack2, card2): diff --git a/pysollib/games/sthelena.py b/pysollib/games/sthelena.py index b6925f42..ad2295f2 100644 --- a/pysollib/games/sthelena.py +++ b/pysollib/games/sthelena.py @@ -157,8 +157,7 @@ class StHelena(Game): (-c.rank, c.suit)), 8) def startGame(self): - self._dealNumRows(7) - self.startDealSample() + self._startDealNumRows(7) self.s.talon.dealRow() self.s.talon.dealRow(self.s.foundations) diff --git a/pysollib/games/takeaway.py b/pysollib/games/takeaway.py index 48a9580f..cb9e4dd2 100644 --- a/pysollib/games/takeaway.py +++ b/pysollib/games/takeaway.py @@ -103,8 +103,7 @@ class TakeAway(Game): # def startGame(self): - self._dealNumRows(10) - self.startDealSample() + self._startDealNumRows(10) for i in range(3): self.s.talon.dealRow() diff --git a/pysollib/games/terrace.py b/pysollib/games/terrace.py index 0d540616..4e0a7f23 100644 --- a/pysollib/games/terrace.py +++ b/pysollib/games/terrace.py @@ -342,8 +342,7 @@ class MamySusan(Terrace): for i in range(6): self.s.talon.dealRow(rows=self.s.reserves, flip=0, frames=0) self.flipMove(self.s.reserves[0]) - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() self.s.talon.dealCards() diff --git a/pysollib/games/ultra/hanafuda.py b/pysollib/games/ultra/hanafuda.py index d0e06a71..be87d80d 100644 --- a/pysollib/games/ultra/hanafuda.py +++ b/pysollib/games/ultra/hanafuda.py @@ -114,8 +114,7 @@ class FlowerClock(AbstractFlowerGame): def startGame(self): assert len(self.s.talon.cards) == 48 - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() assert len(self.s.talon.cards) == 0 @@ -194,8 +193,7 @@ class Gaji(AbstractFlowerGame): def startGame(self): assert len(self.s.talon.cards) == 48 - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) r = self.s.rows self.s.talon.dealRow(rows=(r[0], r[1], r[2], r[5], r[6], r[7])) self.s.talon.dealRow(rows=(r[0], r[1], r[6], r[7])) @@ -454,8 +452,7 @@ class MatsuKiri(AbstractFlowerGame): def startGame(self): assert len(self.s.talon.cards) == 48 - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() assert len(self.s.talon.cards) == 0 @@ -687,8 +684,7 @@ class Sumo(AbstractFlowerGame): def startGame(self): assert len(self.s.talon.cards) == 48 - self._dealNumRows(5) - self.startDealSample() + self._startDealNumRows(5) self.s.talon.dealRow() self.s.talon.dealCards() @@ -732,8 +728,7 @@ class BigSumo(AbstractFlowerGame): def startGame(self): assert len(self.s.talon.cards) == 48 * 2 - self._dealNumRows(9) - self.startDealSample() + self._startDealNumRows(9) self.s.talon.dealRow(rows=self.s.rows[2:8]) self.s.talon.dealCards() diff --git a/pysollib/games/ultra/hexadeck.py b/pysollib/games/ultra/hexadeck.py index 8a756fd9..f91e4883 100644 --- a/pysollib/games/ultra/hexadeck.py +++ b/pysollib/games/ultra/hexadeck.py @@ -1312,8 +1312,7 @@ class MagesGame(Game): def startGame(self): assert len(self.s.talon.cards) == 68 - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.rows[2:10]) self.s.talon.dealCards() diff --git a/pysollib/games/ultra/mughal.py b/pysollib/games/ultra/mughal.py index 9ba771b5..30220e87 100644 --- a/pysollib/games/ultra/mughal.py +++ b/pysollib/games/ultra/mughal.py @@ -357,8 +357,7 @@ class MughalCircles(AbstractMughalGame): def startGame(self): assert len(self.s.talon.cards) == 96 - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() self.s.talon.dealCards() @@ -418,8 +417,7 @@ class EightLegions(AbstractMughalGame): def startGame(self): assert len(self.s.talon.cards) == 96 - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealCards() def isGameWon(self): @@ -482,8 +480,7 @@ class Shamsher(AbstractMughalGame): def startGame(self): assert len(self.s.talon.cards) == 96 - self._dealNumRows(6) - self.startDealSample() + self._startDealNumRows(6) self.s.talon.dealRow(rows=self.s.rows[:12]) self.s.talon.dealCards() diff --git a/pysollib/games/windmill.py b/pysollib/games/windmill.py index 405fa09e..e556c595 100644 --- a/pysollib/games/windmill.py +++ b/pysollib/games/windmill.py @@ -189,8 +189,7 @@ class DutchSolitaire(Windmill): def startGame(self): self.s.talon.dealRow(rows=self.s.foundations, frames=0) - self._dealNumRows(8) - self.startDealSample() + self._startDealNumRows(8) self.s.talon.dealRow() self.s.talon.dealRow() self.s.talon.dealCards() # deal first card to WasteStack diff --git a/pysollib/games/yukon.py b/pysollib/games/yukon.py index 73a941b4..ee7a11c3 100644 --- a/pysollib/games/yukon.py +++ b/pysollib/games/yukon.py @@ -488,8 +488,7 @@ class AustralianPatience(RussianSolitaire): l.defaultAll() def startGame(self): - self._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() self.s.talon.dealCards() @@ -505,8 +504,7 @@ class BimBom(AustralianPatience): AustralianPatience.createGame(self, rows=8) def startGame(self): - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() self.s.talon.dealCards() @@ -547,8 +545,7 @@ class Queensland(Yukon): 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._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() self.s.talon.dealRowAvail() @@ -619,8 +616,7 @@ class Brisbane(Yukon): 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._dealNumRows(3) - self.startDealSample() + self._startDealNumRows(3) self.s.talon.dealRow() self.s.talon.dealRowAvail() @@ -661,8 +657,7 @@ class Hawaiian(Game): def startGame(self): for i in range(104-5*10): self.s.talon.dealRow(rows=self.s.reserves, frames=0) - self._dealNumRows(4) - self.startDealSample() + self._startDealNumRows(4) self.s.talon.dealRow() def getHighlightPilesStacks(self):