From b27a27c9906377b96d038b17786bfd652fd1ebef Mon Sep 17 00:00:00 2001 From: skomoroh Date: Sat, 22 Mar 2008 14:47:41 +0000 Subject: [PATCH] + 1 new game git-svn-id: https://pysolfc.svn.sourceforge.net/svnroot/pysolfc/PySolFC/trunk@223 39dd0a4e-7c14-0410-91b3-c4f2d318f732 --- pysollib/gamedb.py | 10 +++---- pysollib/games/glenwood.py | 4 +-- pysollib/games/golf.py | 56 +++++++++++++++++++++++++++++++++++++- pysollib/games/terrace.py | 2 ++ 4 files changed, 64 insertions(+), 8 deletions(-) diff --git a/pysollib/gamedb.py b/pysollib/gamedb.py index 07311f09..c019a6a6 100644 --- a/pysollib/gamedb.py +++ b/pysollib/gamedb.py @@ -281,17 +281,17 @@ class GI: ("David Bernazzani", (314,)), ("Gordon Bower", (763,)), ("Art Cabral", (9,)), - ("Charles Jewell", (220, 309,)), ("Robert Harbin", (381,)), ("Robert Hogue", (22216,)), + ("Charles Jewell", (220, 309,)), ("Michael Keller", (592,)), ("Fred Lunde", (459,)), - ("Albert Morehead and Geoffrey Mott-Smith", (25, 42, 48, 173, - 303, 547, 738)), - ("Albert Morehead", (362,)), + ("Albert Morehead and Geoffrey Mott-Smith", (25, 42, 48, 173, 282, + 303, 362, 547, 738)), ("David Parlett", (64, 98, 294, 338, 654, 674,)), - ("Randy Rasa", (192,)), + ("Randy Rasa", (187, 190, 191, 192,)), ("Captain Jeffrey T. Spaulding", (400,)), + ("Adam Selene", (366,)), ("John Stoneham", (201,)), ("Bryan Stout", (655,)), ("Bill Taylor", (349,)), diff --git a/pysollib/games/glenwood.py b/pysollib/games/glenwood.py index f8be2761..def1e643 100644 --- a/pysollib/games/glenwood.py +++ b/pysollib/games/glenwood.py @@ -330,9 +330,9 @@ class DoubleFives(Glenwood): # register the game -registerGame(GameInfo(282, Glenwood, "Glenwood", +registerGame(GameInfo(282, Glenwood, "Dutchess", GI.GT_CANFIELD, 1, 1, GI.SL_BALANCED, - altnames=("Duchess",) )) + altnames=("Duchess", "Glenwood",) )) registerGame(GameInfo(587, DoubleFives, "Double Fives", GI.GT_2DECK_TYPE, 2, 1, GI.SL_BALANCED)) diff --git a/pysollib/games/golf.py b/pysollib/games/golf.py index 04ffd52e..51613a2b 100644 --- a/pysollib/games/golf.py +++ b/pysollib/games/golf.py @@ -1074,13 +1074,65 @@ class Flake2Decks(Flake): self.s.talon.dealRow() +# /*********************************************************************** +# // Beacon +# ************************************************************************/ + +class Beacon(Game): + + def createGame(self, rows=8): + # create layout + l, s = Layout(self), self.s + + # set window + playcards = 12 + self.setSize(l.XM+rows*l.XS, l.YM+3*l.YS+playcards*l.YOFFSET) + + # create stacks + x, y = l.XM + (rows-1)*l.XS/2, l.YM + stack = RK_FoundationStack(x, y, self, base_rank=ANY_RANK, + max_cards=52, mod=13) + s.foundations.append(stack) + l.createText(stack, 'ne') + + x, y = l.XM, l.YM+l.YS + for i in range(rows): + s.rows.append(RK_RowStack(x, y, self, base_rank=NO_RANK, mod=13)) + x += l.XS + + x, y = l.XM, self.height-l.YS + s.talon = TalonStack(x, y, self) + l.createText(s.talon, 'se') + + # define stack-groups + l.defaultStackGroups() + + def startGame(self): + for i in range(3): + self.s.talon.dealRow(frames=0) + self.startDealSample() + self.s.talon.dealRow() + + def fillStack(self, stack): + if stack in self.s.rows and not stack.cards: + if self.s.talon.cards: + old_state = self.enterState(self.S_FILL) + self.s.talon.flipMove() + self.s.talon.moveMove(1, stack) + self.leaveState(old_state) + + shallHighlightMatch = Game._shallHighlightMatch_RKW + + + # register the game registerGame(GameInfo(36, Golf, "Golf", GI.GT_GOLF, 1, 0, GI.SL_BALANCED)) registerGame(GameInfo(259, DeadKingGolf, "Dead King Golf", GI.GT_GOLF, 1, 0, GI.SL_BALANCED)) registerGame(GameInfo(260, RelaxedGolf, "Relaxed Golf", - GI.GT_GOLF | GI.GT_RELAXED, 1, 0, GI.SL_BALANCED)) + GI.GT_GOLF | GI.GT_RELAXED, 1, 0, GI.SL_BALANCED, + altnames=("Putt Putt",) )) registerGame(GameInfo(40, Elevator, "Elevator", GI.GT_GOLF, 1, 0, GI.SL_BALANCED, altnames=("Egyptian Solitaire", "Pyramid Golf") )) @@ -1123,4 +1175,6 @@ registerGame(GameInfo(750, Flake2Decks, "Flake (2 decks)", 2, 0, GI.SL_MOSTLY_SKILL)) registerGame(GameInfo(763, Wasatch, "Wasatch", GI.GT_1DECK_TYPE, 1, UNLIMITED_REDEALS, GI.SL_MOSTLY_LUCK)) +registerGame(GameInfo(764, Beacon, "Beacon", + GI.GT_1DECK_TYPE | GI.GT_ORIGINAL, 1, 0, GI.SL_MOSTLY_SKILL)) diff --git a/pysollib/games/terrace.py b/pysollib/games/terrace.py index 97169f4b..a63c7d34 100644 --- a/pysollib/games/terrace.py +++ b/pysollib/games/terrace.py @@ -294,11 +294,13 @@ class Signora(Terrace): # ************************************************************************/ class Madame(Terrace): + Talon_Class = WasteTalonStack INITIAL_RESERVE_CARDS = 15 def createGame(self): Terrace.createGame(self, rows=10, playcards=20) def startGame(self): Terrace.startGame(self, nrows=10) + self.s.talon.dealCards() # /***********************************************************************