mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
+ 1 new game
* minor fixes git-svn-id: file:///home/shlomif/Backup/svn-dumps/PySolFC/svnsync-repos/pysolfc/PySolFC/trunk@249 efabe8c0-fbe8-4139-b769-b5e6d273206e
This commit is contained in:
parent
735f0c0e5a
commit
1ac67d54c4
5 changed files with 14 additions and 24 deletions
Binary file not shown.
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 4.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 3.8 KiB |
|
@ -914,6 +914,7 @@ class FirTree_GameMethods:
|
||||||
|
|
||||||
class ThreeFirTrees(Golf, FirTree_GameMethods):
|
class ThreeFirTrees(Golf, FirTree_GameMethods):
|
||||||
Hint_Class = CautiousDefaultHint
|
Hint_Class = CautiousDefaultHint
|
||||||
|
Waste_Class = Golf_Waste
|
||||||
|
|
||||||
def createGame(self):
|
def createGame(self):
|
||||||
|
|
||||||
|
@ -929,7 +930,7 @@ class ThreeFirTrees(Golf, FirTree_GameMethods):
|
||||||
s.talon = Golf_Talon(x, y, self, max_rounds=1)
|
s.talon = Golf_Talon(x, y, self, max_rounds=1)
|
||||||
l.createText(s.talon, 'n')
|
l.createText(s.talon, 'n')
|
||||||
x += l.XS
|
x += l.XS
|
||||||
s.waste = Golf_Waste(x, y, self)
|
s.waste = self.Waste_Class(x, y, self)
|
||||||
s.waste.CARD_XOFFSET = l.XOFFSET/4
|
s.waste.CARD_XOFFSET = l.XOFFSET/4
|
||||||
l.createText(s.waste, 'n')
|
l.createText(s.waste, 'n')
|
||||||
# the Waste is also our only Foundation in this game
|
# the Waste is also our only Foundation in this game
|
||||||
|
@ -946,6 +947,10 @@ class ThreeFirTrees(Golf, FirTree_GameMethods):
|
||||||
self.s.talon.dealCards()
|
self.s.talon.dealCards()
|
||||||
|
|
||||||
|
|
||||||
|
class RelaxedThreeFirTrees(ThreeFirTrees):
|
||||||
|
Waste_Class = StackWrapper(Golf_Waste, mod=13)
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Napoleon Takes Moscow
|
# * Napoleon Takes Moscow
|
||||||
# * Napoleon Leaves Moscow
|
# * Napoleon Leaves Moscow
|
||||||
|
@ -1169,4 +1174,6 @@ registerGame(GameInfo(763, Wasatch, "Wasatch",
|
||||||
GI.GT_1DECK_TYPE, 1, UNLIMITED_REDEALS, GI.SL_MOSTLY_LUCK))
|
GI.GT_1DECK_TYPE, 1, UNLIMITED_REDEALS, GI.SL_MOSTLY_LUCK))
|
||||||
registerGame(GameInfo(764, Beacon, "Beacon",
|
registerGame(GameInfo(764, Beacon, "Beacon",
|
||||||
GI.GT_1DECK_TYPE | GI.GT_ORIGINAL, 1, 0, GI.SL_MOSTLY_SKILL))
|
GI.GT_1DECK_TYPE | GI.GT_ORIGINAL, 1, 0, GI.SL_MOSTLY_SKILL))
|
||||||
|
registerGame(GameInfo(768, RelaxedThreeFirTrees, "Relaxed Three Fir-trees",
|
||||||
|
GI.GT_GOLF, 2, 0, GI.SL_BALANCED))
|
||||||
|
|
||||||
|
|
|
@ -727,22 +727,10 @@ class TripleAlliance(Game):
|
||||||
# * Pharaohs
|
# * Pharaohs
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
|
||||||
class Pharaohs_RowStack(Pyramid_RowStack):
|
|
||||||
def acceptsCards(self, from_stack, cards):
|
|
||||||
if not self.basicAcceptsCards(from_stack, cards):
|
|
||||||
return False
|
|
||||||
if not self.cards:
|
|
||||||
return False
|
|
||||||
r0, r1 = cards[0].rank, self.cards[-1].rank
|
|
||||||
if r0+r1 == 11:
|
|
||||||
return True
|
|
||||||
return r0 == r1
|
|
||||||
|
|
||||||
|
|
||||||
class Pharaohs(Pyramid):
|
class Pharaohs(Pyramid):
|
||||||
|
|
||||||
Talon_Class = InitialDealTalonStack
|
Talon_Class = InitialDealTalonStack
|
||||||
RowStack_Class = Pharaohs_RowStack
|
RowStack_Class = Pyramid_RowStack
|
||||||
|
|
||||||
PYRAMID_Y_FACTOR = 3
|
PYRAMID_Y_FACTOR = 3
|
||||||
|
|
||||||
|
@ -769,6 +757,7 @@ class Pharaohs(Pyramid):
|
||||||
s.foundations.append(Pyramid_Foundation(x, y, self,
|
s.foundations.append(Pyramid_Foundation(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))
|
||||||
|
l.createText(s.foundations[0], 's')
|
||||||
|
|
||||||
# define stack-groups
|
# define stack-groups
|
||||||
l.defaultStackGroups()
|
l.defaultStackGroups()
|
||||||
|
@ -867,7 +856,7 @@ class Apophis_Hint(Pyramid_Hint):
|
||||||
self.addHint(50000+len(r1.cards)+len(r2.cards), 1, r1, r2)
|
self.addHint(50000+len(r1.cards)+len(r2.cards), 1, r1, r2)
|
||||||
|
|
||||||
|
|
||||||
class Apophis_RowStack(Pharaohs_RowStack):
|
class Apophis_RowStack(Pyramid_RowStack):
|
||||||
def acceptsCards(self, from_stack, cards):
|
def acceptsCards(self, from_stack, cards):
|
||||||
if not self.basicAcceptsCards(from_stack, cards):
|
if not self.basicAcceptsCards(from_stack, cards):
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -194,9 +194,7 @@ class DutchSolitaire(Windmill):
|
||||||
# * Napoleon's Tomb
|
# * Napoleon's Tomb
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
|
||||||
class NapoleonsTomb(Windmill):
|
class NapoleonsTomb(Game):
|
||||||
|
|
||||||
FILL_STACK = False
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# game layout
|
# game layout
|
||||||
|
@ -223,12 +221,11 @@ class NapoleonsTomb(Windmill):
|
||||||
s.rows.append(Windmill_RowStack(x, y, self))
|
s.rows.append(Windmill_RowStack(x, y, self))
|
||||||
x, y = x0 + l.XS, y0 + l.YS
|
x, y = x0 + l.XS, y0 + l.YS
|
||||||
s.foundations.append(Windmill_Foundation(x, y, self, base_rank=5,
|
s.foundations.append(Windmill_Foundation(x, y, self, base_rank=5,
|
||||||
mod=6, min_cards=1, max_cards=24,
|
mod=13, max_cards=24, dir=-1))
|
||||||
max_move=0, dir=-1))
|
|
||||||
for d in ((0.1, 0.1), (1.9, 0.1), (0.1, 1.9), (1.9, 1.9)):
|
for d in ((0.1, 0.1), (1.9, 0.1), (0.1, 1.9), (1.9, 1.9)):
|
||||||
x, y = x0 + d[0] * l.XS, y0 + d[1] * l.YS
|
x, y = x0 + d[0] * l.XS, y0 + d[1] * l.YS
|
||||||
s.foundations.append(Windmill_Foundation(x, y, self,
|
s.foundations.append(Windmill_Foundation(x, y, self,
|
||||||
max_cards=7, base_rank=6, max_move=0))
|
max_cards=7, base_rank=6, mod=13))
|
||||||
|
|
||||||
# define stack-groups
|
# define stack-groups
|
||||||
l.defaultStackGroups()
|
l.defaultStackGroups()
|
||||||
|
@ -238,9 +235,6 @@ class NapoleonsTomb(Windmill):
|
||||||
# game overrides
|
# game overrides
|
||||||
#
|
#
|
||||||
|
|
||||||
def _shuffleHook(self, cards):
|
|
||||||
return cards
|
|
||||||
|
|
||||||
def startGame(self):
|
def startGame(self):
|
||||||
self.startDealSample()
|
self.startDealSample()
|
||||||
self.s.talon.dealRow()
|
self.s.talon.dealRow()
|
||||||
|
|
Loading…
Add table
Reference in a new issue