mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Added Six by Six game.
This commit is contained in:
parent
03de3e84a6
commit
efbb3489b3
12 changed files with 80 additions and 9 deletions
14
html-src/rules/sixbysix.html
Normal file
14
html-src/rules/sixbysix.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<h1>Six by Six</h1>
|
||||
<p>
|
||||
One-Deck game type. 1 deck. No redeal.
|
||||
|
||||
<h3>Object</h3>
|
||||
<p>
|
||||
Move all cards to the foundations.
|
||||
|
||||
<h3>Quick Description</h3>
|
||||
<p>
|
||||
Like <a href="thirtysix.html">Thirty Six</a>,
|
||||
but cards from the talon are dealt straight to the
|
||||
first tableau pile, and only same suit sequences
|
||||
can be moved between tableau piles.
|
|
@ -9,10 +9,10 @@ Move all cards to the foundations.
|
|||
<h3>Rules</h3>
|
||||
<p>
|
||||
Cards are dealt to six tableau piles of six cards
|
||||
each. During the initial deal, any card that would be
|
||||
dealt but can be moved to a foundation is moved there
|
||||
immediately. Tableau piles are built down by rank,
|
||||
regardless of suit.
|
||||
each. During the initial deal, any ace that would be
|
||||
dealt is instead moved to the foundation immediately.
|
||||
Tableau piles are built down by rank, regardless of
|
||||
suit.
|
||||
<p>
|
||||
Cards can be dealt from the talon one at a time. No
|
||||
redeal is allowed.
|
||||
|
|
|
@ -1698,6 +1698,9 @@ msgstr "Ablegen in Zwischentalon"
|
|||
msgid "Deal to tableau"
|
||||
msgstr "Lege auf das Tableau"
|
||||
|
||||
msgid "Deal to first tableau"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/wizardutil.py:142
|
||||
msgid "Deal to reserves"
|
||||
msgstr "Lege in die Reserve"
|
||||
|
|
|
@ -1728,6 +1728,9 @@ msgstr "Distribuer à la défausse"
|
|||
msgid "Deal to tableau"
|
||||
msgstr "Distribuer au tableau"
|
||||
|
||||
msgid "Deal to first tableau"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/wizardutil.py:142
|
||||
msgid "Deal to reserves"
|
||||
msgstr "Distribuer aux réserves"
|
||||
|
|
|
@ -1736,6 +1736,9 @@ msgstr "Manda nel pozzo"
|
|||
msgid "Deal to tableau"
|
||||
msgstr "Manda nel tableau"
|
||||
|
||||
msgid "Deal to first tableau"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/wizardutil.py:142
|
||||
msgid "Deal to reserves"
|
||||
msgstr "Manda nella riserva"
|
||||
|
|
|
@ -1732,6 +1732,9 @@ msgstr "Przełóż do zrzutu"
|
|||
msgid "Deal to tableau"
|
||||
msgstr "Przełóż na stół gry"
|
||||
|
||||
msgid "Deal to first tableau"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/wizardutil.py:142
|
||||
msgid "Deal to reserves"
|
||||
msgstr "Przełóż na stos rezerwowy"
|
||||
|
|
|
@ -1620,6 +1620,9 @@ msgstr ""
|
|||
msgid "Deal to tableau"
|
||||
msgstr ""
|
||||
|
||||
msgid "Deal to first tableau"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/wizardutil.py:142
|
||||
msgid "Deal to reserves"
|
||||
msgstr ""
|
||||
|
|
|
@ -1728,6 +1728,9 @@ msgstr "Сдавать на сброс"
|
|||
msgid "Deal to tableau"
|
||||
msgstr "Сдавать на игровой стол"
|
||||
|
||||
msgid "Deal to first tableau"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/wizardutil.py:142
|
||||
msgid "Deal to reserves"
|
||||
msgstr "Сдавать на резервные ячейки"
|
||||
|
|
|
@ -378,8 +378,7 @@ class GI:
|
|||
|
||||
# Solitude for Windows
|
||||
# still missing:
|
||||
# Bowling (Sackson version), Four Kingdoms, Icicles,
|
||||
# Six By Six
|
||||
# Bowling (Sackson version), Four Kingdoms, Icicles
|
||||
("Solitude for Windows", (
|
||||
2, 8, 11, 13, 19, 24, 25, 29, 30, 31, 33, 34, 36, 38, 42,
|
||||
43, 45, 48, 50, 53, 56, 57, 58, 62, 64, 67, 69, 71, 86, 87,
|
||||
|
@ -387,7 +386,7 @@ class GI:
|
|||
128, 133, 134, 135, 139, 146, 147, 171, 172, 173, 221, 222,
|
||||
224, 228, 233, 234, 235, 256, 257, 258, 282, 314, 327, 330,
|
||||
355, 356, 398, 406, 414, 418, 434, 437, 484, 593, 715, 716,
|
||||
737, 751, 805, 830, 845, 847, 901, 903
|
||||
737, 751, 805, 830, 845, 847, 888, 901, 903
|
||||
)),
|
||||
|
||||
# XM Solitaire
|
||||
|
@ -552,7 +551,7 @@ class GI:
|
|||
tuple(range(22217, 22219))),
|
||||
('fc-2.14', tuple(range(811, 827))),
|
||||
('fc-2.15', tuple(range(827, 855)) + tuple(range(22400, 22407))),
|
||||
('dev', tuple(range(855, 888)))
|
||||
('dev', tuple(range(855, 889)))
|
||||
)
|
||||
|
||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||
|
|
|
@ -35,6 +35,7 @@ from pysollib.pysoltk import MfxCanvasText
|
|||
from pysollib.stack import \
|
||||
AC_RowStack, \
|
||||
BO_RowStack, \
|
||||
DealFirstRowTalonStack, \
|
||||
DealRowTalonStack, \
|
||||
InitialDealTalonStack, \
|
||||
KingAC_RowStack, \
|
||||
|
@ -905,6 +906,7 @@ class Lanes(Klondike):
|
|||
|
||||
# ************************************************************************
|
||||
# * Thirty Six
|
||||
# * Six By Six
|
||||
# ************************************************************************
|
||||
|
||||
class ThirtySix(Klondike):
|
||||
|
@ -920,7 +922,7 @@ class ThirtySix(Klondike):
|
|||
if r.cards:
|
||||
c = r.cards[-1]
|
||||
for f in self.s.foundations:
|
||||
if f.acceptsCards(r, [c]):
|
||||
if f.acceptsCards(r, [c]) and c.rank == ACE:
|
||||
self.moveMove(1, r, f, frames=4, shadow=0)
|
||||
return 1
|
||||
return 0
|
||||
|
@ -937,6 +939,23 @@ class ThirtySix(Klondike):
|
|||
shallHighlightMatch = Game._shallHighlightMatch_RK
|
||||
|
||||
|
||||
class SixBySix(ThirtySix):
|
||||
|
||||
Talon_Class = StackWrapper(DealFirstRowTalonStack, max_move=0)
|
||||
RowStack_Class = StackWrapper(Spider_SS_RowStack, base_rank=ANY_RANK)
|
||||
|
||||
def createGame(self):
|
||||
Klondike.createGame(self, rows=6, max_rounds=1, waste=0)
|
||||
|
||||
def startGame(self):
|
||||
self.startDealSample()
|
||||
for i in range(6):
|
||||
self.s.talon.dealRow()
|
||||
while True:
|
||||
if not self._fillOne():
|
||||
break
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
# * Q.C.
|
||||
# ************************************************************************
|
||||
|
@ -1656,3 +1675,5 @@ registerGame(GameInfo(869, Smokey, "Smokey",
|
|||
GI.GT_KLONDIKE, 1, 2, GI.SL_BALANCED))
|
||||
registerGame(GameInfo(873, AgnesTwo, "Agnes Two",
|
||||
GI.GT_RAGLAN, 2, 0, GI.SL_BALANCED))
|
||||
registerGame(GameInfo(888, SixBySix, "Six by Six",
|
||||
GI.GT_1DECK_TYPE, 1, 0, GI.SL_BALANCED))
|
||||
|
|
|
@ -1994,6 +1994,12 @@ class DealRowTalonStack(TalonStack):
|
|||
return self.dealRowAvail(sound=sound)
|
||||
|
||||
|
||||
# A single click deals one card to each of the RowStacks.
|
||||
class DealFirstRowTalonStack(TalonStack):
|
||||
def dealCards(self, sound=False):
|
||||
return self.dealRowAvail(sound=sound, rows=(self.game.s.rows[0],))
|
||||
|
||||
|
||||
# For games where the Talon is only used for the initial dealing.
|
||||
class InitialDealTalonStack(TalonStack):
|
||||
# no bindings
|
||||
|
@ -2048,6 +2054,17 @@ class DealRowRedealTalonStack(TalonStack, RedealCards_StackMethods):
|
|||
rows=rows, shuffle=True)
|
||||
|
||||
|
||||
class DealFirstRowRedealTalonStack(DealRowRedealTalonStack):
|
||||
|
||||
def canDealCards(self, rows=None):
|
||||
return DealRowRedealTalonStack.canDealCards(
|
||||
self, rows=self.game.s.reserves)
|
||||
|
||||
def dealCards(self, sound=False, rows=None):
|
||||
return DealRowRedealTalonStack.dealCards(
|
||||
self, sound=sound, rows=(self.game.s.rows[0],))
|
||||
|
||||
|
||||
class DealReserveRedealTalonStack(DealRowRedealTalonStack):
|
||||
|
||||
def canDealCards(self, rows=None):
|
||||
|
|
|
@ -31,6 +31,7 @@ from pysollib.stack import AC_FoundationStack, \
|
|||
BO_FoundationStack, \
|
||||
BO_RowStack, \
|
||||
BasicRowStack, \
|
||||
DealFirstRowRedealTalonStack, \
|
||||
DealReserveRedealTalonStack, \
|
||||
DealRowRedealTalonStack, \
|
||||
GroundsForADivorceTalonStack, \
|
||||
|
@ -148,6 +149,7 @@ TalonType = WizSetting(
|
|||
values_map=((n_('Deal all cards at the beginning'), InitialDealTalonStack),
|
||||
(n_('Deal to waste'), WasteTalonStack),
|
||||
(n_('Deal to tableau'), DealRowRedealTalonStack),
|
||||
(n_('Deal to first tableau'), DealFirstRowRedealTalonStack),
|
||||
(n_('Deal to reserves'), DealReserveRedealTalonStack),
|
||||
(n_('Spider'), SpiderTalonStack),
|
||||
(n_('Grounds for a Divorce'), GroundsForADivorceTalonStack),
|
||||
|
|
Loading…
Add table
Reference in a new issue