diff --git a/po/ru_games.po b/po/ru_games.po index 84aee5c1..27c7930e 100644 --- a/po/ru_games.po +++ b/po/ru_games.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PySol 0.0.1\n" "POT-Creation-Date: Sun Jun 11 10:16:06 2006\n" -"PO-Revision-Date: 2006-06-10 11:07+0400\n" +"PO-Revision-Date: 2006-06-18 11:28+0400\n" "Last-Translator: Скоморох \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" @@ -375,7 +375,7 @@ msgid "Castle of Indolence" msgstr "Замок праздности" msgid "Castles in Spain" -msgstr "Замок в Испании" +msgstr "Воздушные замки" msgid "Cat and Mouse" msgstr "Кот и Мышь" diff --git a/pysollib/games/beleagueredcastle.py b/pysollib/games/beleagueredcastle.py index fa3eb092..0617beda 100644 --- a/pysollib/games/beleagueredcastle.py +++ b/pysollib/games/beleagueredcastle.py @@ -627,25 +627,27 @@ class Rittenhouse(Game): # /*********************************************************************** +# // Lightweight # // Castle Mount # ************************************************************************/ -class CastleMount(StreetsAndAlleys): - DEAL = (11, 1) - RowStack_Class = Spider_SS_RowStack +class Lightweight(StreetsAndAlleys): + DEAL = (7, 1) + RowStack_Class = StackWrapper(RK_RowStack, base_rank=KING) - def createGame(self, rows=12): + def createGame(self, rows=12, playcards=20): l, s = Layout(self), self.s - max_rows = max(12, rows) - self.setSize(l.XM+max_rows*l.XS, l.YM+2*l.YS+20*l.YOFFSET) + decks = self.gameinfo.decks + max_rows = max(decks*4, rows) + self.setSize(l.XM+max_rows*l.XS, l.YM+2*l.YS+playcards*l.YOFFSET) - x, y = l.XM+(max_rows-12)*l.XS/2, l.YM + x, y = l.XM+(max_rows-decks*4)*l.XS/2, l.YM for i in range(4): - for j in range(3): + for j in range(decks): s.foundations.append(SS_FoundationStack(x, y, self, suit=i, max_move=0)) x += l.XS - x, y = l.XM, l.YM+l.YS + x, y = l.XM+(max_rows-rows)*l.XS/2, l.YM+l.YS for i in range(rows): s.rows.append(self.RowStack_Class(x, y, self)) x += l.XS @@ -653,7 +655,6 @@ class CastleMount(StreetsAndAlleys): l.defaultAll() - def _shuffleHook(self, cards): # move Aces to top of the Talon (i.e. first cards to be dealt) return self._shuffleHookMoveToTop(cards, @@ -667,6 +668,11 @@ class CastleMount(StreetsAndAlleys): for i in range(self.DEAL[1]): self.s.talon.dealRowAvail() + +class CastleMount(Lightweight): + DEAL = (11, 1) + RowStack_Class = Spider_SS_RowStack + def shallHighlightMatch(self, stack1, card1, stack2, card2): return ((card1.rank + 1) % stack1.cap.mod == card2.rank or (card2.rank + 1) % stack1.cap.mod == card1.rank) @@ -707,5 +713,7 @@ registerGame(GameInfo(395, Zerline3Decks, "Zerline (3 decks)", GI.GT_BELEAGUERED_CASTLE | GI.GT_ORIGINAL, 3, 0)) registerGame(GameInfo(400, Rittenhouse, "Rittenhouse", GI.GT_BELEAGUERED_CASTLE | GI.GT_OPEN, 2, 0)) -registerGame(GameInfo(507, CastleMount, "Castle Mount", +registerGame(GameInfo(507, Lightweight, "Lightweight", + GI.GT_BELEAGUERED_CASTLE | GI.GT_OPEN | GI.GT_ORIGINAL, 2, 0)) +registerGame(GameInfo(508, CastleMount, "Castle Mount", GI.GT_BELEAGUERED_CASTLE | GI.GT_OPEN, 3, 0)) diff --git a/pysollib/games/braid.py b/pysollib/games/braid.py index 76880e72..85e555e7 100644 --- a/pysollib/games/braid.py +++ b/pysollib/games/braid.py @@ -119,8 +119,7 @@ class Braid_ReserveStack(ReserveStack): class Braid(Game): Hint_Class = Braid_Hint - Foundation_Class_1 = Braid_Foundation - Foundation_Class_2 = Braid_Foundation + Foundation_Classes = [Braid_Foundation, Braid_Foundation] BRAID_CARDS = 20 RANKS = RANKS # pull into class Braid @@ -135,8 +134,9 @@ class Braid(Game): # set window # (piles up to 20 cards are playable - needed for Braid_BraidStack) + decks = self.gameinfo.decks h = max(4*l.YS + 30, l.YS+(self.BRAID_CARDS-1)*l.YOFFSET) - self.setSize(10*l.XS+l.XM, l.YM + h) + self.setSize(l.XM+(8+decks)*l.XS, l.YM+h) # extra settings self.base_card = None @@ -167,15 +167,16 @@ class Braid(Game): x = x - l.XS s.waste = WasteStack(x, y, self) l.createText(s.waste, "ss") - x = l.XM + 8 * l.XS y = l.YM for i in range(4): - s.foundations.append(self.Foundation_Class_1(x, y, self, suit=i)) - s.foundations.append(self.Foundation_Class_2(x + l.XS, y, self, suit=i)) + x = l.XM+8*l.XS + for cl in self.Foundation_Classes: + s.foundations.append(cl(x, y, self, suit=i)) + x += l.XS y = y + l.YS + x = 8*l.XS+decks*l.XS/2 self.texts.info = MfxCanvasText(self.canvas, - x + l.CW + l.XM / 2, y, - anchor="n", + x, y, anchor="n", font=self.app.getFont("canvas_default")) # define stack-groups @@ -205,7 +206,7 @@ class Braid(Game): self.s.talon.dealRow(frames=4) # deal base_card to foundations self.base_card = self.s.talon.cards[-1] - to_stack = self.s.foundations[2 * self.base_card.suit] + to_stack = self.s.foundations[self.gameinfo.decks*self.base_card.suit] self.flipMove(self.s.talon) self.moveMove(1, self.s.talon, to_stack) self.updateText() @@ -263,8 +264,8 @@ class LongBraid(Braid): class Fort(Braid): - Foundation_Class_1 = SS_FoundationStack - Foundation_Class_2 = StackWrapper(SS_FoundationStack, base_rank=KING, dir=-1) + Foundation_Classes = [SS_FoundationStack, + StackWrapper(SS_FoundationStack, base_rank=KING, dir=-1)] BRAID_CARDS = 21 @@ -367,6 +368,15 @@ class BackbonePlus(Backbone): Backbone.createGame(self, rows=10) +# /*********************************************************************** +# // Big Braid +# ************************************************************************/ + +class BigBraid(Braid): + Foundation_Classes = [Braid_Foundation, Braid_Foundation, Braid_Foundation] + + + # register the game registerGame(GameInfo(12, Braid, "Braid", GI.GT_NAPOLEON, 2, 2, @@ -380,3 +390,5 @@ registerGame(GameInfo(376, Backbone, "Backbone", GI.GT_NAPOLEON, 2, 0)) registerGame(GameInfo(377, BackbonePlus, "Backbone +", GI.GT_NAPOLEON, 2, 0)) +registerGame(GameInfo(510, BigBraid, "Big Braid", + GI.GT_NAPOLEON, 3, 2)) diff --git a/pysollib/games/freecell.py b/pysollib/games/freecell.py index 148fbccb..0a71684c 100644 --- a/pysollib/games/freecell.py +++ b/pysollib/games/freecell.py @@ -310,6 +310,19 @@ class Cell11(TripleFreecell): self.s.talon.dealRow(rows=[self.s.reserves[0],self.s.reserves[-1]]) +class BigCell(TripleFreecell): + RowStack_Class = AC_RowStack + + def createGame(self): + TripleFreecell.createGame(self, rows=13, reserves=4) + + def startGame(self): + for i in range(11): + self.s.talon.dealRow(frames=0) + self.startDealSample() + self.s.talon.dealRow() + + # /*********************************************************************** # // Spidercells # ************************************************************************/ @@ -527,4 +540,6 @@ registerGame(GameInfo(451, Cell11, "Cell 11", GI.GT_FREECELL | GI.GT_OPEN, 3, 0)) registerGame(GameInfo(464, FourColours, "Four Colours", GI.GT_FREECELL | GI.GT_OPEN, 1, 0)) +registerGame(GameInfo(509, BigCell, "Big Cell", + GI.GT_FREECELL | GI.GT_OPEN | GI.GT_ORIGINAL, 3, 0)) diff --git a/pysollib/games/klondike.py b/pysollib/games/klondike.py index d6e961a0..82de9dca 100644 --- a/pysollib/games/klondike.py +++ b/pysollib/games/klondike.py @@ -284,6 +284,7 @@ class BlindAlleys(Eastcliff): # /*********************************************************************** # // Somerset # // Morehead +# // Canister # ************************************************************************/ class Somerset(Klondike): @@ -306,10 +307,6 @@ class Morehead(Somerset): RowStack_Class = StackWrapper(ThumbAndPouch_RowStack, max_move=1) -# /*********************************************************************** -# // Canister -# ************************************************************************/ - class Canister(Klondike): Talon_Class = InitialDealTalonStack RowStack_Class = RK_RowStack @@ -1082,9 +1079,9 @@ registerGame(GameInfo(107, PasSeul, "Pas Seul", registerGame(GameInfo(81, BlindAlleys, "Blind Alleys", GI.GT_KLONDIKE, 1, 1)) registerGame(GameInfo(215, Somerset, "Somerset", - GI.GT_KLONDIKE | GI.GT_OPEN, 1, 0)) + GI.GT_BELEAGUERED_CASTLE | GI.GT_OPEN, 1, 0)) registerGame(GameInfo(231, Canister, "Canister", - GI.GT_KLONDIKE | GI.GT_OPEN, 1, 0)) + GI.GT_BELEAGUERED_CASTLE | GI.GT_OPEN, 1, 0)) registerGame(GameInfo(229, AgnesSorel, "Agnes Sorel", GI.GT_GYPSY, 1, 0)) registerGame(GameInfo(4, EightTimesEight, "8 x 8", @@ -1127,7 +1124,7 @@ registerGame(GameInfo(350, Q_C_, "Q.C.", registerGame(GameInfo(361, NorthwestTerritory, "Northwest Territory", GI.GT_RAGLAN, 1, 0)) registerGame(GameInfo(362, Morehead, "Morehead", - GI.GT_KLONDIKE | GI.GT_OPEN, 1, 0)) + GI.GT_BELEAGUERED_CASTLE | GI.GT_OPEN, 1, 0)) registerGame(GameInfo(388, Senate, "Senate", GI.GT_RAGLAN, 2, 0)) registerGame(GameInfo(389, SenatePlus, "Senate +", diff --git a/pysollib/games/sultan.py b/pysollib/games/sultan.py index aacea609..9967e83c 100644 --- a/pysollib/games/sultan.py +++ b/pysollib/games/sultan.py @@ -650,7 +650,7 @@ class CornerSuite(Game): def createGame(self): l, s = Layout(self), self.s - self.setSize(l.XM+5*l.XS, l.YM+4*l.YS) + self.setSize(l.XM+5*l.XS, l.YM+5*l.YS) suit = 0 for x, y in ((0,0), (4,0), (0,4), (4,4)):