Compare commits
3 commits
3a356670bb
...
23f41d9553
Author | SHA1 | Date | |
---|---|---|---|
|
23f41d9553 | ||
|
77f1125156 | ||
|
b26821048c |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
BIN
data/images/redealicons/remix/redeal.png
Normal file
After Width: | Height: | Size: 808 B |
BIN
data/images/redealicons/remix/stopsign.png
Normal file
After Width: | Height: | Size: 395 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
data/images/tree/bluecurve/emptynode.png
Normal file
After Width: | Height: | Size: 440 B |
BIN
data/images/tree/bluecurve/folder.png
Normal file
After Width: | Height: | Size: 564 B |
BIN
data/images/tree/bluecurve/node.png
Normal file
After Width: | Height: | Size: 295 B |
BIN
data/images/tree/bluecurve/openfolder.png
Normal file
After Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
data/tiles/Jean.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
15
html-src/rules/eleventriangle.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<h1>Eleven Triangle</h1>
|
||||||
|
<p>
|
||||||
|
Pairing game type. 1 deck. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the single foundation.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="triangle.html">Triangle</a>,
|
||||||
|
but cards are removed that total 11, with face cards
|
||||||
|
removed in pairs of the same rank. Also, the cards
|
||||||
|
from the talon are dealt to three waste piles (similar
|
||||||
|
to <a href="apophis.html">Apophis</a>) with no redeal.
|
|
@ -603,7 +603,7 @@ class GI:
|
||||||
tuple(range(13168, 13170)) + tuple(range(18000, 18005)) +
|
tuple(range(13168, 13170)) + tuple(range(18000, 18005)) +
|
||||||
tuple(range(19000, 19012)) + tuple(range(22303, 22311)) +
|
tuple(range(19000, 19012)) + tuple(range(22303, 22311)) +
|
||||||
tuple(range(22353, 22361))),
|
tuple(range(22353, 22361))),
|
||||||
('dev', tuple(range(961, 969))),
|
('dev', tuple(range(961, 970))),
|
||||||
)
|
)
|
||||||
|
|
||||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||||
|
|
|
@ -1011,7 +1011,8 @@ class SwissPatience(Gypsy):
|
||||||
class AceOfHearts_Foundation(RK_FoundationStack):
|
class AceOfHearts_Foundation(RK_FoundationStack):
|
||||||
def acceptsCards(self, from_stack, cards):
|
def acceptsCards(self, from_stack, cards):
|
||||||
if not self.cards:
|
if not self.cards:
|
||||||
return cards[0].suit == HEART and cards[0].rank == ACE
|
return len(cards) == 1 and cards[0].suit == HEART and \
|
||||||
|
cards[0].rank == ACE
|
||||||
return RK_FoundationStack.acceptsCards(self, from_stack, cards)
|
return RK_FoundationStack.acceptsCards(self, from_stack, cards)
|
||||||
|
|
||||||
def getBottomImage(self):
|
def getBottomImage(self):
|
||||||
|
@ -1034,7 +1035,8 @@ class AceOfHearts(Game):
|
||||||
r = l.s.foundations[3]
|
r = l.s.foundations[3]
|
||||||
s.foundations.append(
|
s.foundations.append(
|
||||||
AceOfHearts_Foundation(r.x, r.y, self, suit=HEART,
|
AceOfHearts_Foundation(r.x, r.y, self, suit=HEART,
|
||||||
max_cards=52, mod=13))
|
max_cards=52, max_accept=1,
|
||||||
|
mod=13))
|
||||||
for r in l.s.rows:
|
for r in l.s.rows:
|
||||||
s.rows.append(Yukon_SS_RowStack(r.x, r.y, self,
|
s.rows.append(Yukon_SS_RowStack(r.x, r.y, self,
|
||||||
base_rank=KING))
|
base_rank=KING))
|
||||||
|
|
|
@ -1330,35 +1330,47 @@ class Apophis_RowStack(Pyramid_RowStack):
|
||||||
class Apophis(Pharaohs):
|
class Apophis(Pharaohs):
|
||||||
Hint_Class = Apophis_Hint
|
Hint_Class = Apophis_Hint
|
||||||
RowStack_Class = Apophis_RowStack
|
RowStack_Class = Apophis_RowStack
|
||||||
|
Waste_Class = Pyramid_Waste
|
||||||
|
Foundation_Class = Pyramid_Foundation
|
||||||
|
|
||||||
PYRAMID_Y_FACTOR = 2
|
PYRAMID_Y_FACTOR = 2
|
||||||
|
INVERT = False
|
||||||
|
MAX_ROUNDS = 3
|
||||||
|
|
||||||
def createGame(self):
|
def createGame(self):
|
||||||
# create layout
|
# create layout
|
||||||
layout, s = Layout(self), self.s
|
layout, s = Layout(self), self.s
|
||||||
|
|
||||||
# set window
|
# set window
|
||||||
w = layout.XM + 9*layout.XS
|
cols = 9
|
||||||
h = layout.YM + 4*layout.YS
|
if self.INVERT:
|
||||||
|
cols = 10
|
||||||
|
w = layout.XM + cols * layout.XS
|
||||||
|
h = layout.YM + 4 * layout.YS
|
||||||
self.setSize(w, h)
|
self.setSize(w, h)
|
||||||
|
|
||||||
# create stacks
|
# create stacks
|
||||||
x, y = layout.XM+1.5*layout.XS, layout.YM
|
x, y = layout.XM+1.5*layout.XS, layout.YM
|
||||||
s.rows = self._createPyramid(layout, x, y, 7)
|
if self.INVERT:
|
||||||
|
s.rows = self._createInvertedPyramid(layout, x, y, 7)
|
||||||
|
else:
|
||||||
|
s.rows = self._createPyramid(layout, x, y, 7)
|
||||||
|
|
||||||
x, y = layout.XM, layout.YM
|
x, y = layout.XM, layout.YM
|
||||||
s.talon = DealReserveRedealTalonStack(x, y, self, max_rounds=3)
|
s.talon = DealReserveRedealTalonStack(x, y, self,
|
||||||
|
max_rounds=self.MAX_ROUNDS)
|
||||||
layout.createText(s.talon, 'se')
|
layout.createText(s.talon, 'se')
|
||||||
layout.createRoundText(s.talon, 'ne')
|
if s.talon.max_rounds > 1:
|
||||||
|
layout.createRoundText(s.talon, 'ne')
|
||||||
|
|
||||||
y += layout.YS
|
y += layout.YS
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
stack = Pyramid_Waste(x, y, self, max_accept=1)
|
stack = self.Waste_Class(x, y, self, max_accept=1)
|
||||||
s.reserves.append(stack)
|
s.reserves.append(stack)
|
||||||
layout.createText(stack, 'se')
|
layout.createText(stack, 'se')
|
||||||
y += layout.YS
|
y += layout.YS
|
||||||
x, y = self.width - layout.XS, layout.YM
|
x, y = self.width - layout.XS, layout.YM
|
||||||
s.foundations.append(Pyramid_Foundation(x, y, self,
|
s.foundations.append(self.Foundation_Class(x, y, self,
|
||||||
suit=ANY_SUIT, dir=0, base_rank=ANY_RANK,
|
suit=ANY_SUIT, dir=0, base_rank=ANY_RANK,
|
||||||
max_move=0, max_cards=52))
|
max_move=0, max_cards=52))
|
||||||
layout.createText(s.foundations[0], 'nw')
|
layout.createText(s.foundations[0], 'nw')
|
||||||
|
@ -1374,6 +1386,43 @@ class Apophis(Pharaohs):
|
||||||
def shallHighlightMatch(self, stack1, card1, stack2, card2):
|
def shallHighlightMatch(self, stack1, card1, stack2, card2):
|
||||||
return card1.rank + card2.rank == 11
|
return card1.rank + card2.rank == 11
|
||||||
|
|
||||||
|
|
||||||
|
# ************************************************************************
|
||||||
|
# * Eleven Triangle
|
||||||
|
# ************************************************************************
|
||||||
|
|
||||||
|
class ElevenTriangle_StackMethods():
|
||||||
|
def acceptsCards(self, from_stack, cards):
|
||||||
|
if self.basicIsBlocked():
|
||||||
|
return False
|
||||||
|
if from_stack is self or not self.cards or len(cards) != 1:
|
||||||
|
return False
|
||||||
|
c = self.cards[-1]
|
||||||
|
return c.face_up and cards[0].face_up and \
|
||||||
|
(cards[0].rank + c.rank == 9 or (cards[0].rank > 9 and
|
||||||
|
cards[0].rank == c.rank))
|
||||||
|
|
||||||
|
def _dropKingClickHandler(self, event):
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
class ElevenTriangle_RowStack(ElevenTriangle_StackMethods, Pyramid_RowStack):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class ElevenTriangle_Waste(ElevenTriangle_StackMethods, Pyramid_Waste):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class ElevenTriangle(Apophis):
|
||||||
|
RowStack_Class = ElevenTriangle_RowStack
|
||||||
|
Waste_Class = ElevenTriangle_Waste
|
||||||
|
Foundation_Class = PyramidDozen_Foundation
|
||||||
|
|
||||||
|
INVERT = True
|
||||||
|
MAX_ROUNDS = 1
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Cheops
|
# * Cheops
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
@ -1876,3 +1925,5 @@ registerGame(GameInfo(950, Eighteens, "Eighteens",
|
||||||
altnames=("Steel Wheels",)))
|
altnames=("Steel Wheels",)))
|
||||||
registerGame(GameInfo(961, Nines, "Nines",
|
registerGame(GameInfo(961, Nines, "Nines",
|
||||||
GI.GT_PAIRING_TYPE, 1, 0, GI.SL_LUCK))
|
GI.GT_PAIRING_TYPE, 1, 0, GI.SL_LUCK))
|
||||||
|
registerGame(GameInfo(969, ElevenTriangle, "Eleven Triangle",
|
||||||
|
GI.GT_PAIRING_TYPE, 1, 0, GI.SL_MOSTLY_LUCK))
|
||||||
|
|