mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-03-12 04:07:01 -04:00
Add Noumea game
This commit is contained in:
parent
6f0c6e00e1
commit
a57f1eae38
3 changed files with 82 additions and 1 deletions
27
html-src/rules/noumea.html
Normal file
27
html-src/rules/noumea.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
<h1>Noumea</h1>
|
||||
<p>
|
||||
One-Deck game type. 1 decks. 2 redeals.
|
||||
|
||||
<h3>Object</h3>
|
||||
<p>
|
||||
Move all cards to the foundations.
|
||||
|
||||
<h3>Rules</h3>
|
||||
<p>
|
||||
The four aces are dealt to the foundations, and 20 cards
|
||||
are dealt to reserve piles. The reserve piles can hold a
|
||||
single card and are automatically filled from the waste or
|
||||
talon when empty.
|
||||
<p>
|
||||
There is no building on the tableau piles, so you can
|
||||
only move cards to the foundations.
|
||||
<p>
|
||||
When there are no moves left, you can deal cards three at
|
||||
a time from the talon, and move them to an appropriate
|
||||
foundation. Two redeals are allowed, so you can go through
|
||||
the deck three times. The game is won if all cards are
|
||||
moved to the foundations.
|
||||
|
||||
<h3>Notes</h3>
|
||||
<p>
|
||||
<i>Autodrop</i> is disabled for this game.
|
|
@ -594,7 +594,7 @@ class GI:
|
|||
tuple(range(19000, 19012)) + tuple(range(22303, 22311)) +
|
||||
tuple(range(22353, 22361))),
|
||||
('fc-3.1', tuple(range(961, 971))),
|
||||
('dev', tuple(range(971, 978)) + tuple(range(5419, 5421)) +
|
||||
('dev', tuple(range(971, 979)) + tuple(range(5419, 5421)) +
|
||||
tuple(range(16683, 16685)) + tuple(range(18005, 18007)) +
|
||||
(44, 526,)),
|
||||
)
|
||||
|
|
|
@ -231,6 +231,58 @@ class Kingdom(RoyalCotillion):
|
|||
self.s.talon.dealCards() # deal first card to WasteStack
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
# * Noumea
|
||||
# ************************************************************************
|
||||
|
||||
class Noumea(RoyalCotillion):
|
||||
Foundation_Class = SS_FoundationStack
|
||||
|
||||
def createGame(self):
|
||||
# create layout
|
||||
l, s = Layout(self), self.s
|
||||
|
||||
# set window
|
||||
self.setSize(l.XM + 5*l.XS, l.YM + 6*l.YS)
|
||||
|
||||
# create stacks
|
||||
x, y, = l.XM + .5 * l.XS, l.YM
|
||||
for i in range(4):
|
||||
s.foundations.append(self.Foundation_Class(x, y, self, i))
|
||||
x += l.XS
|
||||
x, y, = l.XM, y + l.YS
|
||||
for j in range(4):
|
||||
for i in range(5):
|
||||
s.reserves.append(ReserveStack(x, y, self, max_accept=0))
|
||||
x += l.XS
|
||||
x = l.XM
|
||||
y += l.YS
|
||||
x, y = l.XM + 1.5 * l.XS, l.YM + 5 * l.YS
|
||||
s.talon = WasteTalonStack(x, y, self, max_rounds=3, num_deal=3)
|
||||
l.createText(s.talon, "sw")
|
||||
x += l.XS
|
||||
s.waste = WasteStack(x, y, self)
|
||||
l.createText(s.waste, "se")
|
||||
|
||||
# define stack-groups
|
||||
l.defaultStackGroups()
|
||||
|
||||
#
|
||||
# game overrides
|
||||
#
|
||||
|
||||
def _shuffleHook(self, cards):
|
||||
# move Aces to top of the Talon (i.e. first cards to be dealt)
|
||||
return self._shuffleHookMoveToTop(
|
||||
cards, lambda c: (c.rank == ACE, c.suit))
|
||||
|
||||
def startGame(self):
|
||||
self.s.talon.dealRow(rows=self.s.foundations, frames=0)
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow(rows=self.s.reserves)
|
||||
self.s.talon.dealCards() # deal first card to WasteStack
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
# * Alhambra
|
||||
# * Granada
|
||||
|
@ -1624,3 +1676,5 @@ registerGame(GameInfo(943, RosamundsBower, "Rosamund's Bower",
|
|||
altnames=("Rosamund",)))
|
||||
registerGame(GameInfo(952, BigAlhambra, "Big Alhambra",
|
||||
GI.GT_3DECK_TYPE, 3, 2, GI.SL_BALANCED))
|
||||
registerGame(GameInfo(978, Noumea, "Noumea",
|
||||
GI.GT_1DECK_TYPE, 1, 2, GI.SL_MOSTLY_LUCK))
|
||||
|
|
Loading…
Add table
Reference in a new issue