mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Matching type cardset support for allowing Memory games to use any cardset.
This commit is contained in:
parent
b4d75cb46c
commit
03de3e84a6
21 changed files with 215 additions and 50 deletions
|
@ -41,6 +41,7 @@ Cardsets Types:
|
|||
* Navagraha Ganjiga = 7
|
||||
* Dashavatara Ganjifa = 8
|
||||
* Trumps Only = 9
|
||||
* Matching = 10
|
||||
|
||||
*$C:* The number of cards in the cardset, generally 42, 48, 52, 68, 78, 96 or 120
|
||||
|
||||
|
@ -65,6 +66,7 @@ Cardsets Styles:
|
|||
* Hex A Deck = 29
|
||||
* Holiday = 13
|
||||
* Mahjongg = 28
|
||||
* Matching = 32
|
||||
* Movies = 14
|
||||
* Matrix = 31
|
||||
* Music = 15
|
||||
|
|
BIN
data/images/cards/bottoms/matching/bottom02-n.png
Normal file
BIN
data/images/cards/bottoms/matching/bottom02-n.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 129 B |
BIN
data/images/cards/bottoms/matching/bottom02.png
Normal file
BIN
data/images/cards/bottoms/matching/bottom02.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 129 B |
|
@ -44,6 +44,9 @@ back01.ext;back02.ext;back03.ext</pre>
|
|||
<li>
|
||||
<p>Trumps Only = 9</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Matching = 10</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p><b>$C:</b> The number of cards in the cardset, generally 42,
|
||||
48, 52, 68, 78, 96 or 120</p>
|
||||
|
@ -99,6 +102,9 @@ back01.ext;back02.ext;back03.ext</pre>
|
|||
<li>
|
||||
<p>Mahjongg = 28</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Matching = 32</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Movies = 14</p>
|
||||
</li>
|
||||
|
|
30
html-src/rules/memory16.html
Normal file
30
html-src/rules/memory16.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
<h1>Memory 16</h1>
|
||||
<p>
|
||||
Memory game type. 16 cards. No redeal.
|
||||
|
||||
<h3>Object</h3>
|
||||
<p>
|
||||
Flip all pairs of matching cards and get a score of 40 points or more.
|
||||
|
||||
<h3>Rules</h3>
|
||||
<p>
|
||||
At game start 8 pairs of cards are dealt to the tableau piles.
|
||||
<p>
|
||||
Flip any 2 cards that match in suit and rank (or just rank or picture,
|
||||
depending on the cardset used).
|
||||
<p>
|
||||
Any pair that matches will gain you 5 points, while a pair that
|
||||
doesn't match will cost you 1 point.
|
||||
<p>
|
||||
You win if your final score reaches 30 points.
|
||||
|
||||
<h3>Notes</h3>
|
||||
<p>
|
||||
To get awarded for a perfect game you must reach the maximum score of
|
||||
40 points. You can reach this by restarting the game.
|
||||
<p>
|
||||
<i>Undo</i>, <i>Bookmarks</i>, <i>Autodrop</i> and <i>Quickplay</i>
|
||||
are disabled for this game.
|
||||
<p>
|
||||
Memory can be played with any type of cardset, including special
|
||||
Matching cardsets.
|
|
@ -10,7 +10,8 @@ Flip all pairs of matching cards and get a score of 40 points or more.
|
|||
<p>
|
||||
At game start 12 pairs of cards are dealt to the tableau piles.
|
||||
<p>
|
||||
Flip any 2 cards that match in suit and rank.
|
||||
Flip any 2 cards that match in suit and rank (or just rank or picture,
|
||||
depending on the cardset used).
|
||||
<p>
|
||||
Any pair that matches will gain you 5 points, while a pair that
|
||||
doesn't match will cost you 1 point.
|
||||
|
@ -24,3 +25,6 @@ To get awarded for a perfect game you must reach the maximum score of
|
|||
<p>
|
||||
<i>Undo</i>, <i>Bookmarks</i>, <i>Autodrop</i> and <i>Quickplay</i>
|
||||
are disabled for this game.
|
||||
<p>
|
||||
Memory can be played with any type of cardset, including special
|
||||
Matching cardsets.
|
||||
|
|
|
@ -10,7 +10,8 @@ Flip all pairs of matching cards and get a score of 45 points or more.
|
|||
<p>
|
||||
At game start 15 pairs of cards are dealt to the tableau piles.
|
||||
<p>
|
||||
Flip any 2 cards that match in suit and rank.
|
||||
Flip any 2 cards that match in suit and rank (or just rank or picture,
|
||||
depending on the cardset used).
|
||||
<p>
|
||||
Any pair that matches will gain you 5 points, while a pair that
|
||||
doesn't match will cost you 1 point.
|
||||
|
@ -24,3 +25,6 @@ To get awarded for a perfect game you must reach the maximum score of
|
|||
<p>
|
||||
<i>Undo</i>, <i>Bookmarks</i>, <i>Autodrop</i> and <i>Quickplay</i>
|
||||
are disabled for this game.
|
||||
<p>
|
||||
Memory can be played with any type of cardset, including special
|
||||
Matching cardsets.
|
||||
|
|
|
@ -10,7 +10,8 @@ Flip all pairs of matching cards and get a score of 50 points or more.
|
|||
<p>
|
||||
At game start 20 pairs of cards are dealt to the tableau piles.
|
||||
<p>
|
||||
Flip any 2 cards that match in suit and rank.
|
||||
Flip any 2 cards that match in suit and rank (or just rank or picture,
|
||||
depending on the cardset used).
|
||||
<p>
|
||||
Any pair that matches will gain you 5 points, while a pair that
|
||||
doesn't match will cost you 1 point.
|
||||
|
@ -24,3 +25,6 @@ To get awarded for a perfect game you must reach the maximum score of
|
|||
<p>
|
||||
<i>Undo</i>, <i>Bookmarks</i>, <i>Autodrop</i> and <i>Quickplay</i>
|
||||
are disabled for this game.
|
||||
<p>
|
||||
Memory can be played with any type of cardset, including special
|
||||
Matching cardsets.
|
||||
|
|
30
html-src/rules/memory52.html
Normal file
30
html-src/rules/memory52.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
<h1>Memory 52</h1>
|
||||
<p>
|
||||
Memory game type. 52 cards. No redeal.
|
||||
|
||||
<h3>Object</h3>
|
||||
<p>
|
||||
Flip all pairs of matching cards and get a score of 40 points or more.
|
||||
|
||||
<h3>Rules</h3>
|
||||
<p>
|
||||
At game start 26 pairs of cards are dealt to the tableau piles.
|
||||
<p>
|
||||
Flip any 2 cards that match in suit and rank (or just rank or picture,
|
||||
depending on the cardset used).
|
||||
<p>
|
||||
Any pair that matches will gain you 5 points, while a pair that
|
||||
doesn't match will cost you 1 point.
|
||||
<p>
|
||||
You win if your final score reaches 50 points.
|
||||
|
||||
<h3>Notes</h3>
|
||||
<p>
|
||||
To get awarded for a perfect game you must reach the maximum score of
|
||||
130 points. You can reach this by restarting the game.
|
||||
<p>
|
||||
<i>Undo</i>, <i>Bookmarks</i>, <i>Autodrop</i> and <i>Quickplay</i>
|
||||
are disabled for this game.
|
||||
<p>
|
||||
Memory can be played with any type of cardset, including special
|
||||
Matching cardsets.
|
|
@ -868,6 +868,9 @@ msgstr "Dashavatara Ganjifa (120 Karten)"
|
|||
msgid "Trumps only type (variable cards)"
|
||||
msgstr "Trumpf nur Typ (variable Karten)"
|
||||
|
||||
msgid "Matching type (variable cards)"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/resource.py:194
|
||||
msgid "French"
|
||||
msgstr "Französisch"
|
||||
|
@ -904,6 +907,9 @@ msgstr "Dashavatara Ganjifa"
|
|||
msgid "Trumps only"
|
||||
msgstr "Nur Trumpf"
|
||||
|
||||
msgid "Matching"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/resource.py:219
|
||||
msgid "Adult"
|
||||
msgstr "Erwachsene"
|
||||
|
|
|
@ -898,6 +898,9 @@ msgstr "Type Dashavatara Ganjifa (120 cartes)"
|
|||
msgid "Trumps only type (variable cards)"
|
||||
msgstr "Type Atouts seulement (cartes variables)"
|
||||
|
||||
msgid "Matching type (variable cards)"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/resource.py:194
|
||||
msgid "French"
|
||||
msgstr "Français"
|
||||
|
@ -934,6 +937,9 @@ msgstr "Dashavatara Ganjifa"
|
|||
msgid "Trumps only"
|
||||
msgstr "Atouts seulement"
|
||||
|
||||
msgid "Matching"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/resource.py:219
|
||||
msgid "Adult"
|
||||
msgstr "Adulte"
|
||||
|
|
|
@ -906,6 +906,9 @@ msgstr "Tipo Dashavatara Ganjifa (120 carte)"
|
|||
msgid "Trumps only type (variable cards)"
|
||||
msgstr "Tipo Trionfi (carte variabili)"
|
||||
|
||||
msgid "Matching type (variable cards)"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/resource.py:194
|
||||
msgid "French"
|
||||
msgstr "Francesi"
|
||||
|
@ -942,6 +945,9 @@ msgstr "Dashavatara Ganjifa"
|
|||
msgid "Trumps only"
|
||||
msgstr "Solo Trionfi"
|
||||
|
||||
msgid "Matching"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/resource.py:219
|
||||
msgid "Adult"
|
||||
msgstr "Adulti"
|
||||
|
|
|
@ -899,6 +899,9 @@ msgstr "Typ Dashavatara Ganjifa (120 kart)"
|
|||
msgid "Trumps only type (variable cards)"
|
||||
msgstr "Typ tylko Atu (różne karty)"
|
||||
|
||||
msgid "Matching type (variable cards)"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/resource.py:194
|
||||
msgid "French"
|
||||
msgstr "Francuski"
|
||||
|
@ -935,6 +938,9 @@ msgstr "Dashavatara Ganjifa"
|
|||
msgid "Trumps only"
|
||||
msgstr "Tylko Atu"
|
||||
|
||||
msgid "Matching"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/resource.py:219
|
||||
msgid "Adult"
|
||||
msgstr "Dla dorosłych"
|
||||
|
|
|
@ -812,6 +812,9 @@ msgstr ""
|
|||
msgid "Trumps only type (variable cards)"
|
||||
msgstr ""
|
||||
|
||||
msgid "Matching type (variable cards)"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/resource.py:194
|
||||
msgid "French"
|
||||
msgstr ""
|
||||
|
@ -848,6 +851,9 @@ msgstr ""
|
|||
msgid "Trumps only"
|
||||
msgstr ""
|
||||
|
||||
msgid "Matching"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/resource.py:219
|
||||
msgid "Adult"
|
||||
msgstr ""
|
||||
|
|
|
@ -893,6 +893,9 @@ msgstr "Дашаватара Ганджифа (120 карт)"
|
|||
msgid "Trumps only type (variable cards)"
|
||||
msgstr "Без мастей (переменное количество карт)"
|
||||
|
||||
msgid "Matching type (variable cards)"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/resource.py:194
|
||||
msgid "French"
|
||||
msgstr "Классические"
|
||||
|
@ -929,6 +932,9 @@ msgstr "Дашаватара Ганджифа"
|
|||
msgid "Trumps only"
|
||||
msgstr "Без мастей"
|
||||
|
||||
msgid "Matching"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/resource.py:219
|
||||
msgid "Adult"
|
||||
msgstr "Для взрослых"
|
||||
|
|
|
@ -794,6 +794,10 @@ class Application:
|
|||
t1 = t0
|
||||
elif len(cs.trumps) < gi.ncards: # not enough cards
|
||||
t1 = t0
|
||||
elif gc == GI.GC_MATCHING:
|
||||
t0 = "Matching"
|
||||
if cs.ncards < (gi.ncards / 2): # not enough cards
|
||||
t1 = t0
|
||||
else:
|
||||
# we should not come here
|
||||
t0 = t1 = "Unknown"
|
||||
|
|
|
@ -3456,9 +3456,7 @@ class Game(object):
|
|||
|
||||
# for find_card_dialog
|
||||
def canFindCard(self):
|
||||
# All games currently support find card, though
|
||||
# this may change later.
|
||||
return True
|
||||
return self.gameinfo.category != GI.GC_MATCHING
|
||||
|
||||
#
|
||||
# subclass hooks
|
||||
|
|
|
@ -48,6 +48,9 @@ class GI:
|
|||
GC_NAVAGRAHA_GANJIFA = CSI.TYPE_NAVAGRAHA_GANJIFA
|
||||
GC_DASHAVATARA_GANJIFA = CSI.TYPE_DASHAVATARA_GANJIFA
|
||||
GC_TRUMP_ONLY = CSI.TYPE_TRUMP_ONLY
|
||||
GC_MATCHING = CSI.TYPE_MATCHING
|
||||
|
||||
NUM_CATEGORIES = CSI.TYPE_MATCHING
|
||||
|
||||
# game type
|
||||
GT_1DECK_TYPE = 0
|
||||
|
@ -549,13 +552,13 @@ 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, 886)))
|
||||
('dev', tuple(range(855, 888)))
|
||||
)
|
||||
|
||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||
# in the registerGame() call
|
||||
_CHILDREN_GAMES = [16, 33, 55, 90, 91, 96, 97, 176, 328, 329, 862, 865,
|
||||
903, ]
|
||||
886, 903, ]
|
||||
|
||||
_OPEN_GAMES = []
|
||||
|
||||
|
@ -631,7 +634,7 @@ class GameInfo(Struct):
|
|||
if pysollib.settings.TRANSLATE_GAME_NAMES:
|
||||
altnames = [_(n) for n in altnames]
|
||||
#
|
||||
if not (1 <= category <= 9):
|
||||
if not (1 <= category <= GI.NUM_CATEGORIES):
|
||||
if game_type == GI.GT_HANAFUDA:
|
||||
category = GI.GC_HANAFUDA
|
||||
elif game_type == GI.GT_TAROCK:
|
||||
|
|
|
@ -143,7 +143,6 @@ class Memory24(Game):
|
|||
|
||||
def startGame(self):
|
||||
n = self.COLUMNS * self.ROWS
|
||||
assert len(self.s.talon.cards) == n
|
||||
self.other_stack = None
|
||||
self.closed_cards = n
|
||||
self.score = 0
|
||||
|
@ -152,7 +151,6 @@ class Memory24(Game):
|
|||
self.s.talon.dealRow(rows=self.s.rows[:n], flip=0, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow(rows=self.s.rows[n:], flip=0)
|
||||
assert len(self.s.talon.cards) == 0
|
||||
|
||||
def isGameWon(self):
|
||||
return self.closed_cards == 0 and self.score >= self.WIN_SCORE
|
||||
|
@ -221,6 +219,13 @@ class Memory24(Game):
|
|||
p.dump(self.score)
|
||||
|
||||
|
||||
class Memory16(Memory24):
|
||||
COLUMNS = 4
|
||||
ROWS = 4
|
||||
WIN_SCORE = 30
|
||||
PERFECT_SCORE = 40 # 5 * (4*4)/2
|
||||
|
||||
|
||||
class Memory30(Memory24):
|
||||
COLUMNS = 6
|
||||
ROWS = 5
|
||||
|
@ -235,6 +240,13 @@ class Memory40(Memory24):
|
|||
PERFECT_SCORE = 100 # 5 * (8*5)/2
|
||||
|
||||
|
||||
class Memory52(Memory24):
|
||||
COLUMNS = 13
|
||||
ROWS = 4
|
||||
WIN_SCORE = 50
|
||||
PERFECT_SCORE = 130 # 5 * (13*4)/2
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
# * Concentration
|
||||
# ************************************************************************
|
||||
|
@ -379,15 +391,26 @@ class MemorySequence(Memory24):
|
|||
|
||||
|
||||
# register the game
|
||||
registerGame(GameInfo(886, Memory16, "Memory 16",
|
||||
GI.GT_MEMORY | GI.GT_SCORE, 2, 0, GI.SL_SKILL,
|
||||
category=GI.GC_MATCHING,
|
||||
suits=(), ranks=(), trumps=list(range(8))))
|
||||
registerGame(GameInfo(176, Memory24, "Memory 24",
|
||||
GI.GT_MEMORY | GI.GT_SCORE, 2, 0, GI.SL_SKILL,
|
||||
suits=(0, 2), ranks=(0, 8, 9, 10, 11, 12)))
|
||||
category=GI.GC_MATCHING,
|
||||
suits=(), ranks=(), trumps=list(range(12))))
|
||||
registerGame(GameInfo(219, Memory30, "Memory 30",
|
||||
GI.GT_MEMORY | GI.GT_SCORE, 2, 0, GI.SL_SKILL,
|
||||
suits=(0, 2, 3), ranks=(0, 9, 10, 11, 12)))
|
||||
category=GI.GC_MATCHING,
|
||||
suits=(), ranks=(), trumps=list(range(15))))
|
||||
registerGame(GameInfo(177, Memory40, "Memory 40",
|
||||
GI.GT_MEMORY | GI.GT_SCORE, 2, 0, GI.SL_SKILL,
|
||||
suits=(0, 2), ranks=(0, 4, 5, 6, 7, 8, 9, 10, 11, 12)))
|
||||
category=GI.GC_MATCHING,
|
||||
suits=(), ranks=(), trumps=list(range(20))))
|
||||
registerGame(GameInfo(887, Memory52, "Memory 52",
|
||||
GI.GT_MEMORY | GI.GT_SCORE, 2, 0, GI.SL_SKILL,
|
||||
category=GI.GC_MATCHING,
|
||||
suits=(), ranks=(), trumps=list(range(26))))
|
||||
registerGame(GameInfo(178, Concentration, "Concentration",
|
||||
GI.GT_MEMORY | GI.GT_SCORE, 1, 0, GI.SL_SKILL,
|
||||
altnames=("Pelmanism")))
|
||||
|
|
|
@ -197,6 +197,7 @@ highlight_piles = float(0.2, 9.9)
|
|||
7 = string_list(min=2, max=2)
|
||||
8 = string_list(min=2, max=2)
|
||||
9 = string_list(min=2, max=2)
|
||||
10 = string_list(min=2, max=2)
|
||||
scale_cards = boolean
|
||||
scale_x = float
|
||||
scale_y = float
|
||||
|
@ -547,6 +548,7 @@ class Options:
|
|||
CSI.TYPE_NAVAGRAHA_GANJIFA: ("Dashavatara Ganjifa XL", ""),
|
||||
CSI.TYPE_DASHAVATARA_GANJIFA: ("Dashavatara Ganjifa XL", ""),
|
||||
CSI.TYPE_TRUMP_ONLY: ("Next Matrix", ""),
|
||||
CSI.TYPE_MATCHING: ("Neo", "")
|
||||
}
|
||||
else:
|
||||
self.cardset = {
|
||||
|
@ -562,6 +564,7 @@ class Options:
|
|||
CSI.TYPE_NAVAGRAHA_GANJIFA: ("Dashavatara Ganjifa", ""),
|
||||
CSI.TYPE_DASHAVATARA_GANJIFA: ("Dashavatara Ganjifa", ""),
|
||||
CSI.TYPE_TRUMP_ONLY: ("Matrix", ""),
|
||||
CSI.TYPE_MATCHING: (c, ""),
|
||||
}
|
||||
|
||||
# not changeable options
|
||||
|
|
|
@ -180,6 +180,7 @@ class CSI:
|
|||
TYPE_NAVAGRAHA_GANJIFA = 7
|
||||
TYPE_DASHAVATARA_GANJIFA = 8
|
||||
TYPE_TRUMP_ONLY = 9
|
||||
TYPE_MATCHING = 10
|
||||
|
||||
TYPE = {
|
||||
1: _("French type (52 cards)"),
|
||||
|
@ -191,6 +192,7 @@ class CSI:
|
|||
7: _("Navagraha Ganjifa type (108 cards)"),
|
||||
8: _("Dashavatara Ganjifa type (120 cards)"),
|
||||
9: _("Trumps only type (variable cards)"),
|
||||
10: _("Matching type (variable cards)"),
|
||||
}
|
||||
|
||||
TYPE_NAME = {
|
||||
|
@ -203,54 +205,59 @@ class CSI:
|
|||
7: _("Navagraha Ganjifa"),
|
||||
8: _("Dashavatara Ganjifa"),
|
||||
9: _("Trumps only"),
|
||||
10: _("Matching"),
|
||||
}
|
||||
|
||||
TYPE_ID = {
|
||||
1: "french",
|
||||
2: "hanafuda",
|
||||
3: "tarock",
|
||||
4: "mahjongg",
|
||||
5: "hex-a-deck",
|
||||
6: "mughal-ganjifa",
|
||||
7: "navagraha-ganjifa",
|
||||
8: "dashavatara-ganjifa",
|
||||
9: "trumps-only",
|
||||
1: "french",
|
||||
2: "hanafuda",
|
||||
3: "tarock",
|
||||
4: "mahjongg",
|
||||
5: "hex-a-deck",
|
||||
6: "mughal-ganjifa",
|
||||
7: "navagraha-ganjifa",
|
||||
8: "dashavatara-ganjifa",
|
||||
9: "trumps-only",
|
||||
10: "matching"
|
||||
}
|
||||
|
||||
TYPE_SUITS = {
|
||||
1: "cshd",
|
||||
2: "abcdefghijkl",
|
||||
3: "cshd",
|
||||
4: "abc",
|
||||
5: "cshd",
|
||||
6: "abcdefgh",
|
||||
7: "abcdefghi",
|
||||
8: "abcdefghij",
|
||||
9: "",
|
||||
1: "cshd",
|
||||
2: "abcdefghijkl",
|
||||
3: "cshd",
|
||||
4: "abc",
|
||||
5: "cshd",
|
||||
6: "abcdefgh",
|
||||
7: "abcdefghi",
|
||||
8: "abcdefghij",
|
||||
9: "",
|
||||
10: ""
|
||||
}
|
||||
|
||||
TYPE_RANKS = {
|
||||
1: list(range(13)),
|
||||
2: list(range(4)),
|
||||
3: list(range(14)),
|
||||
4: list(range(10)),
|
||||
5: list(range(16)),
|
||||
6: list(range(12)),
|
||||
7: list(range(12)),
|
||||
8: list(range(12)),
|
||||
9: list(range(0)),
|
||||
1: list(range(13)),
|
||||
2: list(range(4)),
|
||||
3: list(range(14)),
|
||||
4: list(range(10)),
|
||||
5: list(range(16)),
|
||||
6: list(range(12)),
|
||||
7: list(range(12)),
|
||||
8: list(range(12)),
|
||||
9: list(range(0)),
|
||||
10: list(range(0)),
|
||||
}
|
||||
|
||||
TYPE_TRUMPS = {
|
||||
1: (),
|
||||
2: (),
|
||||
3: list(range(22)),
|
||||
4: list(range(12)),
|
||||
5: list(range(4)),
|
||||
6: (),
|
||||
7: (),
|
||||
8: (),
|
||||
9: (),
|
||||
1: (),
|
||||
2: (),
|
||||
3: list(range(22)),
|
||||
4: list(range(12)),
|
||||
5: list(range(4)),
|
||||
6: (),
|
||||
7: (),
|
||||
8: (),
|
||||
9: (),
|
||||
10: (),
|
||||
}
|
||||
|
||||
# cardset styles
|
||||
|
@ -271,6 +278,7 @@ class CSI:
|
|||
29: _("Hex A Deck"), #
|
||||
13: _("Holiday"), #
|
||||
28: _("Mahjongg"), #
|
||||
32: _("Matching"), #
|
||||
14: _("Movies"), #
|
||||
31: _("Matrix"), #
|
||||
15: _("Music"), #
|
||||
|
@ -476,6 +484,16 @@ class CardsetManager(ResourceManager):
|
|||
cs.nletters = 0
|
||||
cs.nshadows = 0
|
||||
cs.trumps = list(range(cs.ncards))
|
||||
elif s == CSI.TYPE_MATCHING:
|
||||
# ???return 0 ## FIXME
|
||||
# cs.nbottoms = 7
|
||||
# cs.ranks = ()
|
||||
# cs.suits = ""
|
||||
# cs.trumps = range(cs.ncards)
|
||||
cs.nbottoms = 1
|
||||
cs.nletters = 0
|
||||
cs.nshadows = 0
|
||||
cs.trumps = list(range(cs.ncards))
|
||||
|
||||
else:
|
||||
return 0
|
||||
|
|
Loading…
Add table
Reference in a new issue