Skip to content

Commit

Permalink
Add stack help for Four Kingdoms
Browse files Browse the repository at this point in the history
  • Loading branch information
joeraz committed Oct 30, 2024
1 parent eb3bb5d commit f448248
Show file tree
Hide file tree
Showing 8 changed files with 202 additions and 19 deletions.
25 changes: 24 additions & 1 deletion po/de_pysol.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: PySol 0.0.1\n"
"Report-Msgid-Bugs-To: \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 <[email protected]>\n"
"Language-Team: German\n"
"Language: de\n"
Expand Down Expand Up @@ -2362,6 +2362,29 @@ msgstr ""
msgid "Subjects"
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
msgid "Tableau. Build down by suit or of the same rank."
msgstr "Tableau. Erstellt nach unten nach Farbe oder denselben Rang."
Expand Down
25 changes: 24 additions & 1 deletion po/fr_pysol.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 1.02\n"
"Report-Msgid-Bugs-To: \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 <[email protected]>\n"
"Language-Team: French\n"
"Language: fr\n"
Expand Down Expand Up @@ -2402,6 +2402,29 @@ msgstr ""
msgid "Subjects"
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
msgid "Tableau. Build down by suit or of the same rank."
msgstr "Tableau. Décroissant par enseigne ou de même valeur."
Expand Down
25 changes: 24 additions & 1 deletion po/it_pysol.po
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ msgstr ""
"Project-Id-Version: it_pysol\n"
"Report-Msgid-Bugs-To: \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 <[email protected]>\n"
"Language-Team: Italiano <[email protected]>\n"
"Language: it\n"
Expand Down Expand Up @@ -2410,6 +2410,29 @@ msgstr ""
msgid "Subjects"
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
msgid "Tableau. Build down by suit or of the same rank."
msgstr "Tableau: Sequenza decrescente dello stesso seme"
Expand Down
25 changes: 24 additions & 1 deletion po/pl_pysol.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PySolFC\n"
"Report-Msgid-Bugs-To: \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 <[email protected]>\n"
"Language-Team: Polish <[email protected]>\n"
"Language: pl\n"
Expand Down Expand Up @@ -2416,6 +2416,29 @@ msgstr ""
msgid "Subjects"
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
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."
Expand Down
25 changes: 24 additions & 1 deletion po/pt_BR_pysol.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \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 <[email protected]>\n"
"Language-Team: \n"
"Language: pt_BR\n"
Expand Down Expand Up @@ -2423,6 +2423,29 @@ msgstr ""
msgid "Subjects"
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
msgid "Tableau. Build down by suit or of the same rank."
msgstr "Tableau. Construa decrescente por naipe or por valor igual."
Expand Down
23 changes: 23 additions & 0 deletions po/pysol.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2249,6 +2249,29 @@ msgstr ""
msgid "Subjects"
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
msgid "Tableau. Build down by suit or of the same rank."
msgstr ""
Expand Down
25 changes: 24 additions & 1 deletion po/ru_pysol.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \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 <[email protected]>\n"
"Language-Team: Russian <[email protected]>\n"
"Language: ru\n"
Expand Down Expand Up @@ -2408,6 +2408,29 @@ msgstr ""
msgid "Subjects"
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
msgid "Tableau. Build down by suit or of the same rank."
msgstr ""
Expand Down
48 changes: 35 additions & 13 deletions pysollib/games/moojub.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def startGame(self):
# * Four Kingdoms
# ************************************************************************

class FourKingdoms_Foundation(SS_FoundationStack):
class FourKingdoms_KingFoundation(SS_FoundationStack):
RequiredStacks = ()

def acceptsCards(self, from_stack, cards):
Expand All @@ -129,24 +129,38 @@ def acceptsCards(self, from_stack, cards):
return SS_FoundationStack.acceptsCards(self, from_stack, cards)

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):
RequiredStacks = (1, 2, 3, 4)


class FourKingdoms_QueenFoundation(FourKingdoms_Foundation):
class FourKingdoms_QueenFoundation(FourKingdoms_KingFoundation):
RequiredStacks = (-1,)


class FourKingdoms_JackFoundation(FourKingdoms_Foundation):
class FourKingdoms_JackFoundation(FourKingdoms_KingFoundation):
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)

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):
getBottomImage = Stack._getSuitBottomImage
Expand All @@ -160,6 +174,11 @@ def acceptsCards(self, from_stack, cards):
return False
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):

Expand Down Expand Up @@ -187,12 +206,12 @@ def createGame(self):
max_cards=1, max_accept=1))
x += (1.5 * l.XS)
s.foundations.append(
FourKingdoms_Foundation(x, y, self, i, base_rank=9,
max_cards=1, max_accept=1))
FourKingdoms_TowerFoundation(x, y, self, i, base_rank=9,
max_cards=1, max_accept=1))
x += (3 * l.XS)
s.foundations.append(
FourKingdoms_Foundation(x, y, self, i, base_rank=KING,
max_cards=1, max_accept=1))
FourKingdoms_KingFoundation(x, y, self, i, base_rank=KING,
max_cards=1, max_accept=1))
x += l.XS
s.foundations.append(
FourKingdoms_QueenFoundation(x, y, self, i, base_rank=QUEEN,
Expand All @@ -207,6 +226,9 @@ def createGame(self):
dir=-1, max_cards=8,
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):
x, y = l.XM + (l.XS * 3), l.YM + l.TEXT_HEIGHT + (l.YS * i)
s.reserves.append(
Expand Down

0 comments on commit f448248

Please sign in to comment.