mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Organized three peaks variations.
This commit is contained in:
parent
fe9ad5a64f
commit
6d7073b067
4 changed files with 41 additions and 21 deletions
|
@ -9,7 +9,8 @@ The object is to remove all the cards from the tableau by playing
|
|||
them to the waste stack. Cards from the tableau will play to the
|
||||
waste if they are one rank higher or lower than the card at the top
|
||||
of the waste. A King will play on an Ace and vice versa. Cards are
|
||||
played to the waste by clicking on them. Points are made as follows:
|
||||
played to the waste by clicking on them. In variations with scoring,
|
||||
points are made as follows:
|
||||
|
||||
<dl>
|
||||
<dd>When a hand is dealt 52 points are subtracted from the score.
|
||||
|
@ -33,4 +34,4 @@ played to the waste by clicking on them. Points are made as follows:
|
|||
</dl>
|
||||
|
||||
<h3>Notes</h3>
|
||||
Undo is disabled in this game.
|
||||
In variations with scoring, undo is disabled in this game.
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
<h1>Three Peaks Non-scoring</h1>
|
||||
Pairing type game. 1 deck. No redeal.
|
||||
|
||||
<h3>Object</h3>
|
||||
Remove all cards from the tableau.
|
||||
|
||||
<h3>Rules</h3>
|
||||
Play is identical to
|
||||
<a href="threepeaks.html">Three Peaks</a>
|
||||
except no score is kept and plays can be undone.
|
|
@ -311,7 +311,7 @@ class GI:
|
|||
("Gordon Bower", (763, 783,)),
|
||||
("Art Cabral", (9,)),
|
||||
("Robert Harbin", (381,)),
|
||||
("Robert Hogue", (22216,)),
|
||||
("Robert Hogue", (22216, 22217, 22218, 22231,)),
|
||||
("Charles Jewell", (220, 309,)),
|
||||
("Michael Keller", (592,)),
|
||||
("Fred Lunde", (459,)),
|
||||
|
|
|
@ -173,13 +173,13 @@ class ThreePeaks(Game):
|
|||
# Game over rides
|
||||
#
|
||||
|
||||
def startGame(self):
|
||||
def startGame(self, flip=0):
|
||||
assert len(self.s.talon.cards) == self.gameinfo.ncards
|
||||
self.game_score = self.game_score + self.hand_score
|
||||
self.hand_score = -52
|
||||
self.peaks = [0] * 3
|
||||
self.startDealSample()
|
||||
self.s.talon.dealRow(rows=self.s.rows[:18], flip=0, frames=4)
|
||||
self.s.talon.dealRow(rows=self.s.rows[:18], flip=flip, frames=4)
|
||||
self.s.talon.dealRow(rows=self.s.rows[18:], flip=1, frames=4)
|
||||
self.s.talon.dealCards()
|
||||
|
||||
|
@ -261,9 +261,38 @@ class ThreePeaksNoScore(ThreePeaks):
|
|||
return True
|
||||
|
||||
|
||||
registerGame(GameInfo(22216, ThreePeaks, "Three Peaks",
|
||||
GI.GT_PAIRING_TYPE | GI.GT_SCORE, 1, 0, GI.SL_BALANCED,
|
||||
altnames=("Tri Peaks",)
|
||||
))
|
||||
registerGame(GameInfo(22231, ThreePeaksNoScore, "Three Peaks Non-scoring",
|
||||
GI.GT_PAIRING_TYPE, 1, 0, GI.SL_BALANCED))
|
||||
# ************************************************************************
|
||||
# * Three Peaks Game Open
|
||||
# ************************************************************************
|
||||
|
||||
class ThreePeaksOpen(ThreePeaks):
|
||||
SCORING = 0
|
||||
|
||||
def canUndo(self):
|
||||
return True
|
||||
|
||||
def startGame(self):
|
||||
ThreePeaks.startGame(self, flip=1)
|
||||
|
||||
|
||||
# ************************************************************************
|
||||
# * Three Peaks Game Open with scoring
|
||||
# ************************************************************************
|
||||
|
||||
class ThreePeaksOpenScored(ThreePeaks):
|
||||
def startGame(self):
|
||||
ThreePeaks.startGame(self, flip=1)
|
||||
|
||||
|
||||
registerGame(GameInfo(22216, ThreePeaks, "Three Peaks (Scored)",
|
||||
GI.GT_GOLF | GI.GT_SCORE, 1, 0, GI.SL_BALANCED,
|
||||
rules_filename="threepeaks.html"))
|
||||
registerGame(GameInfo(22217, ThreePeaksOpen, "Three Peaks (Open)",
|
||||
GI.GT_GOLF | GI.GT_OPEN, 1, 0, GI.SL_BALANCED,
|
||||
rules_filename="threepeaks.html"))
|
||||
registerGame(GameInfo(22218, ThreePeaksOpenScored, "Three Peaks (Scored/Open)",
|
||||
GI.GT_GOLF | GI.GT_OPEN | GI.GT_SCORE, 1, 0,
|
||||
GI.SL_BALANCED, rules_filename="threepeaks.html"))
|
||||
registerGame(GameInfo(22231, ThreePeaksNoScore, "Three Peaks",
|
||||
GI.GT_GOLF, 1, 0, GI.SL_BALANCED,
|
||||
altnames=("Tri Peaks",)))
|
||||
|
|
Loading…
Add table
Reference in a new issue