1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Add stack help for Four Kingdoms

This commit is contained in:
Joe R 2024-10-29 20:16:46 -04:00
parent eb3bb5dad8
commit f448248741
8 changed files with 202 additions and 19 deletions

View file

@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: PySol 0.0.1\n" "Project-Id-Version: PySol 0.0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-12-10 10:19-0500\n" "POT-Creation-Date: 2021-12-10 10:19-0500\n"
"PO-Revision-Date: 2024-10-19 14:35-0400\n" "PO-Revision-Date: 2024-10-29 20:05-0400\n"
"Last-Translator: H. Schaekel <Holger.Schaekel@web.de>\n" "Last-Translator: H. Schaekel <Holger.Schaekel@web.de>\n"
"Language-Team: German\n" "Language-Team: German\n"
"Language: de\n" "Language: de\n"
@ -2362,6 +2362,29 @@ msgstr ""
msgid "Subjects" msgid "Subjects"
msgstr "" msgstr ""
msgid ""
"Castle. From left to right, accepts the king, queen, and jack of the suit, "
"in that order."
msgstr ""
msgid ""
"Dungeon. Accepts the ace (dragon) of the suit, but only once the tower and "
"castle are filled."
msgstr ""
msgid "Tower. Accepts the ten (wizard) of the suit."
msgstr ""
msgid ""
"Subjects. Builds down by suit from 9 to 2, but can only be built to once "
"the castle is filled."
msgstr ""
msgid ""
"Guest Chambers. A free cell, but only accepts cards of the suit, and only "
"once the king and queen are in the castle."
msgstr ""
#: pysollib/games/curdsandwhey.py:76 #: pysollib/games/curdsandwhey.py:76
msgid "Tableau. Build down by suit or of the same rank." msgid "Tableau. Build down by suit or of the same rank."
msgstr "Tableau. Erstellt nach unten nach Farbe oder denselben Rang." msgstr "Tableau. Erstellt nach unten nach Farbe oder denselben Rang."

View file

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 1.02\n" "Project-Id-Version: 1.02\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-12-10 10:19-0500\n" "POT-Creation-Date: 2021-12-10 10:19-0500\n"
"PO-Revision-Date: 2024-10-19 14:34-0400\n" "PO-Revision-Date: 2024-10-29 20:06-0400\n"
"Last-Translator: Eric Rausch <neelix570@gmail.com>\n" "Last-Translator: Eric Rausch <neelix570@gmail.com>\n"
"Language-Team: French\n" "Language-Team: French\n"
"Language: fr\n" "Language: fr\n"
@ -2402,6 +2402,29 @@ msgstr ""
msgid "Subjects" msgid "Subjects"
msgstr "" msgstr ""
msgid ""
"Castle. From left to right, accepts the king, queen, and jack of the suit, "
"in that order."
msgstr ""
msgid ""
"Dungeon. Accepts the ace (dragon) of the suit, but only once the tower and "
"castle are filled."
msgstr ""
msgid "Tower. Accepts the ten (wizard) of the suit."
msgstr ""
msgid ""
"Subjects. Builds down by suit from 9 to 2, but can only be built to once "
"the castle is filled."
msgstr ""
msgid ""
"Guest Chambers. A free cell, but only accepts cards of the suit, and only "
"once the king and queen are in the castle."
msgstr ""
#: pysollib/games/curdsandwhey.py:76 #: pysollib/games/curdsandwhey.py:76
msgid "Tableau. Build down by suit or of the same rank." msgid "Tableau. Build down by suit or of the same rank."
msgstr "Tableau. Décroissant par enseigne ou de même valeur." msgstr "Tableau. Décroissant par enseigne ou de même valeur."

View file

@ -12,7 +12,7 @@ msgstr ""
"Project-Id-Version: it_pysol\n" "Project-Id-Version: it_pysol\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-12-10 10:19-0500\n" "POT-Creation-Date: 2021-12-10 10:19-0500\n"
"PO-Revision-Date: 2024-10-19 14:34-0400\n" "PO-Revision-Date: 2024-10-29 20:06-0400\n"
"Last-Translator: Giuliano Colla <giuliano.colla@gmail.com>\n" "Last-Translator: Giuliano Colla <giuliano.colla@gmail.com>\n"
"Language-Team: Italiano <it@li.org>\n" "Language-Team: Italiano <it@li.org>\n"
"Language: it\n" "Language: it\n"
@ -2410,6 +2410,29 @@ msgstr ""
msgid "Subjects" msgid "Subjects"
msgstr "" msgstr ""
msgid ""
"Castle. From left to right, accepts the king, queen, and jack of the suit, "
"in that order."
msgstr ""
msgid ""
"Dungeon. Accepts the ace (dragon) of the suit, but only once the tower and "
"castle are filled."
msgstr ""
msgid "Tower. Accepts the ten (wizard) of the suit."
msgstr ""
msgid ""
"Subjects. Builds down by suit from 9 to 2, but can only be built to once "
"the castle is filled."
msgstr ""
msgid ""
"Guest Chambers. A free cell, but only accepts cards of the suit, and only "
"once the king and queen are in the castle."
msgstr ""
#: pysollib/games/curdsandwhey.py:76 #: pysollib/games/curdsandwhey.py:76
msgid "Tableau. Build down by suit or of the same rank." msgid "Tableau. Build down by suit or of the same rank."
msgstr "Tableau: Sequenza decrescente dello stesso seme" msgstr "Tableau: Sequenza decrescente dello stesso seme"

View file

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PySolFC\n" "Project-Id-Version: PySolFC\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-12-10 10:19-0500\n" "POT-Creation-Date: 2021-12-10 10:19-0500\n"
"PO-Revision-Date: 2024-10-19 14:34-0400\n" "PO-Revision-Date: 2024-10-29 20:06-0400\n"
"Last-Translator: Jerzy Trzeciak <artusek@wp.pl>\n" "Last-Translator: Jerzy Trzeciak <artusek@wp.pl>\n"
"Language-Team: Polish <pl@li.org>\n" "Language-Team: Polish <pl@li.org>\n"
"Language: pl\n" "Language: pl\n"
@ -2416,6 +2416,29 @@ msgstr ""
msgid "Subjects" msgid "Subjects"
msgstr "" msgstr ""
msgid ""
"Castle. From left to right, accepts the king, queen, and jack of the suit, "
"in that order."
msgstr ""
msgid ""
"Dungeon. Accepts the ace (dragon) of the suit, but only once the tower and "
"castle are filled."
msgstr ""
msgid "Tower. Accepts the ten (wizard) of the suit."
msgstr ""
msgid ""
"Subjects. Builds down by suit from 9 to 2, but can only be built to once "
"the castle is filled."
msgstr ""
msgid ""
"Guest Chambers. A free cell, but only accepts cards of the suit, and only "
"once the king and queen are in the castle."
msgstr ""
#: pysollib/games/curdsandwhey.py:76 #: pysollib/games/curdsandwhey.py:76
msgid "Tableau. Build down by suit or of the same rank." msgid "Tableau. Build down by suit or of the same rank."
msgstr "Stół gry. Układaj w dół wg koloru lub wg tej samej wartości." msgstr "Stół gry. Układaj w dół wg koloru lub wg tej samej wartości."

View file

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-12-10 10:19-0500\n" "POT-Creation-Date: 2021-12-10 10:19-0500\n"
"PO-Revision-Date: 2024-10-19 14:34-0400\n" "PO-Revision-Date: 2024-10-29 20:07-0400\n"
"Last-Translator: Matheus Knack <mtknack555@gmail.com>\n" "Last-Translator: Matheus Knack <mtknack555@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: pt_BR\n" "Language: pt_BR\n"
@ -2423,6 +2423,29 @@ msgstr ""
msgid "Subjects" msgid "Subjects"
msgstr "" msgstr ""
msgid ""
"Castle. From left to right, accepts the king, queen, and jack of the suit, "
"in that order."
msgstr ""
msgid ""
"Dungeon. Accepts the ace (dragon) of the suit, but only once the tower and "
"castle are filled."
msgstr ""
msgid "Tower. Accepts the ten (wizard) of the suit."
msgstr ""
msgid ""
"Subjects. Builds down by suit from 9 to 2, but can only be built to once "
"the castle is filled."
msgstr ""
msgid ""
"Guest Chambers. A free cell, but only accepts cards of the suit, and only "
"once the king and queen are in the castle."
msgstr ""
#: pysollib/games/curdsandwhey.py:76 #: pysollib/games/curdsandwhey.py:76
msgid "Tableau. Build down by suit or of the same rank." msgid "Tableau. Build down by suit or of the same rank."
msgstr "Tableau. Construa decrescente por naipe or por valor igual." msgstr "Tableau. Construa decrescente por naipe or por valor igual."

View file

@ -2249,6 +2249,29 @@ msgstr ""
msgid "Subjects" msgid "Subjects"
msgstr "" msgstr ""
msgid ""
"Castle. From left to right, accepts the king, queen, "
"and jack of the suit, in that order."
msgstr ""
msgid ""
"Dungeon. Accepts the ace (dragon) of the suit, but only "
"once the tower and castle are filled."
msgstr ""
msgid "Tower. Accepts the ten (wizard) of the suit."
msgstr ""
msgid ""
"Subjects. Builds down by suit from 9 to 2, but can only "
"be built to once the castle is filled."
msgstr ""
msgid ""
"Guest Chambers. A free cell, but only accepts cards of "
"the suit, and only once the king and queen are in the castle."
msgstr ""
#: pysollib/games/curdsandwhey.py:76 #: pysollib/games/curdsandwhey.py:76
msgid "Tableau. Build down by suit or of the same rank." msgid "Tableau. Build down by suit or of the same rank."
msgstr "" msgstr ""

View file

@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-12-10 10:19-0500\n" "POT-Creation-Date: 2021-12-10 10:19-0500\n"
"PO-Revision-Date: 2024-10-19 14:33-0400\n" "PO-Revision-Date: 2024-10-29 20:07-0400\n"
"Last-Translator: Skomoroh <skomoroh@gmail.com>\n" "Last-Translator: Skomoroh <skomoroh@gmail.com>\n"
"Language-Team: Russian <ru@li.org>\n" "Language-Team: Russian <ru@li.org>\n"
"Language: ru\n" "Language: ru\n"
@ -2408,6 +2408,29 @@ msgstr ""
msgid "Subjects" msgid "Subjects"
msgstr "" msgstr ""
msgid ""
"Castle. From left to right, accepts the king, queen, and jack of the suit, "
"in that order."
msgstr ""
msgid ""
"Dungeon. Accepts the ace (dragon) of the suit, but only once the tower and "
"castle are filled."
msgstr ""
msgid "Tower. Accepts the ten (wizard) of the suit."
msgstr ""
msgid ""
"Subjects. Builds down by suit from 9 to 2, but can only be built to once "
"the castle is filled."
msgstr ""
msgid ""
"Guest Chambers. A free cell, but only accepts cards of the suit, and only "
"once the king and queen are in the castle."
msgstr ""
#: pysollib/games/curdsandwhey.py:76 #: pysollib/games/curdsandwhey.py:76
msgid "Tableau. Build down by suit or of the same rank." msgid "Tableau. Build down by suit or of the same rank."
msgstr "" msgstr ""

View file

@ -119,7 +119,7 @@ class Moojub(Game):
# * Four Kingdoms # * Four Kingdoms
# ************************************************************************ # ************************************************************************
class FourKingdoms_Foundation(SS_FoundationStack): class FourKingdoms_KingFoundation(SS_FoundationStack):
RequiredStacks = () RequiredStacks = ()
def acceptsCards(self, from_stack, cards): def acceptsCards(self, from_stack, cards):
@ -129,24 +129,38 @@ class FourKingdoms_Foundation(SS_FoundationStack):
return SS_FoundationStack.acceptsCards(self, from_stack, cards) return SS_FoundationStack.acceptsCards(self, from_stack, cards)
def getHelp(self): def getHelp(self):
return _('Foundation.') return _('Castle. From left to right, accepts the king, queen, '
'and jack of the suit, in that order.')
class FourKingdoms_DungeonFoundation(FourKingdoms_Foundation): class FourKingdoms_QueenFoundation(FourKingdoms_KingFoundation):
RequiredStacks = (1, 2, 3, 4)
class FourKingdoms_QueenFoundation(FourKingdoms_Foundation):
RequiredStacks = (-1,) RequiredStacks = (-1,)
class FourKingdoms_JackFoundation(FourKingdoms_Foundation): class FourKingdoms_JackFoundation(FourKingdoms_KingFoundation):
RequiredStacks = (-1, -2) RequiredStacks = (-1, -2)
class FourKingdoms_SubjectsFoundation(FourKingdoms_Foundation): class FourKingdoms_DungeonFoundation(FourKingdoms_KingFoundation):
RequiredStacks = (1, 2, 3, 4)
def getHelp(self):
return _('Dungeon. Accepts the ace (dragon) of the suit, but only '
'once the tower and castle are filled.')
class FourKingdoms_TowerFoundation(FourKingdoms_KingFoundation):
def getHelp(self):
return _('Tower. Accepts the ten (wizard) of the suit.')
class FourKingdoms_SubjectsFoundation(FourKingdoms_KingFoundation):
RequiredStacks = (-1, -2, -3) RequiredStacks = (-1, -2, -3)
def getHelp(self):
return _('Subjects. Builds down by suit from 9 to 2, but can only '
'be built to once the castle is filled.')
class FourKingdoms_Reserve(ReserveStack): class FourKingdoms_Reserve(ReserveStack):
getBottomImage = Stack._getSuitBottomImage getBottomImage = Stack._getSuitBottomImage
@ -160,6 +174,11 @@ class FourKingdoms_Reserve(ReserveStack):
return False return False
return ReserveStack.acceptsCards(self, from_stack, cards) return ReserveStack.acceptsCards(self, from_stack, cards)
def getHelp(self):
return _('Guest Chambers. A free cell, but only accepts cards of '
'the suit, and only once the king and queen are in the '
'castle.')
class FourKingdoms_RowStack(SS_RowStack): class FourKingdoms_RowStack(SS_RowStack):
@ -187,12 +206,12 @@ class FourKingdoms(Game):
max_cards=1, max_accept=1)) max_cards=1, max_accept=1))
x += (1.5 * l.XS) x += (1.5 * l.XS)
s.foundations.append( s.foundations.append(
FourKingdoms_Foundation(x, y, self, i, base_rank=9, FourKingdoms_TowerFoundation(x, y, self, i, base_rank=9,
max_cards=1, max_accept=1)) max_cards=1, max_accept=1))
x += (3 * l.XS) x += (3 * l.XS)
s.foundations.append( s.foundations.append(
FourKingdoms_Foundation(x, y, self, i, base_rank=KING, FourKingdoms_KingFoundation(x, y, self, i, base_rank=KING,
max_cards=1, max_accept=1)) max_cards=1, max_accept=1))
x += l.XS x += l.XS
s.foundations.append( s.foundations.append(
FourKingdoms_QueenFoundation(x, y, self, i, base_rank=QUEEN, FourKingdoms_QueenFoundation(x, y, self, i, base_rank=QUEEN,
@ -207,6 +226,9 @@ class FourKingdoms(Game):
dir=-1, max_cards=8, dir=-1, max_cards=8,
max_accept=1)) max_accept=1))
# I know it seems weird to add the Guest Chambers out of position
# order, but it makes it so much easier to manage the stack logic
# later.
for i in range(4): for i in range(4):
x, y = l.XM + (l.XS * 3), l.YM + l.TEXT_HEIGHT + (l.YS * i) x, y = l.XM + (l.XS * 3), l.YM + l.TEXT_HEIGHT + (l.YS * i)
s.reserves.append( s.reserves.append(