mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Added Casino Canfield variation.
This commit is contained in:
parent
962dc3ffeb
commit
2d87058ce8
3 changed files with 53 additions and 1 deletions
24
html-src/rules/casinocanfield.html
Normal file
24
html-src/rules/casinocanfield.html
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<h1>Casino Canfield</h1>
|
||||||
|
<p>
|
||||||
|
Canfield type. 1 deck. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the foundations.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Just like <a href="canfield.html">Canfield</a>,
|
||||||
|
but cards are dealt from the talon one at a time,
|
||||||
|
and there is no redeal.
|
||||||
|
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<p>
|
||||||
|
There is a simple casino scoring system here - you debit $52 for each game
|
||||||
|
and for every card you bear off, you get $5 credit.
|
||||||
|
Your balance is reset whenever you select a different game.
|
||||||
|
Loaded games and manually entered game numbers don't count.
|
||||||
|
<p>
|
||||||
|
Casino Canfield is an attempt to recreate the game played in
|
||||||
|
Richard A. Canfield's casino, though it is possible that the game in
|
||||||
|
question is actually <a href="vegasklondike.html">a variation of Klondike</a>.
|
|
@ -485,7 +485,7 @@ class GI:
|
||||||
('fc-2.12', tuple(range(774, 811)) + (16681,) +
|
('fc-2.12', tuple(range(774, 811)) + (16681,) +
|
||||||
tuple(range(22217, 22219))),
|
tuple(range(22217, 22219))),
|
||||||
('fc-2.14', tuple(range(811, 827))),
|
('fc-2.14', tuple(range(811, 827))),
|
||||||
('fc-2.16', tuple(range(827, 835)))
|
('fc-2.16', tuple(range(827, 836)))
|
||||||
)
|
)
|
||||||
|
|
||||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||||
|
|
|
@ -348,6 +348,32 @@ class VariegatedCanfield(Canfield):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
# ************************************************************************
|
||||||
|
# * Casino Canfield
|
||||||
|
# ************************************************************************
|
||||||
|
|
||||||
|
class CasinoCanfield(Canfield):
|
||||||
|
getGameScore = Game.getGameScoreCasino
|
||||||
|
getGameBalance = Game.getGameScoreCasino
|
||||||
|
|
||||||
|
def createGame(self, max_rounds=1, num_deal=1):
|
||||||
|
lay = Canfield.createGame(self, max_rounds=max_rounds,
|
||||||
|
num_deal=num_deal)
|
||||||
|
self.texts.score = MfxCanvasText(self.canvas,
|
||||||
|
8, self.height - 8, anchor="sw",
|
||||||
|
font=self.app.getFont("canvas_large"))
|
||||||
|
return lay
|
||||||
|
|
||||||
|
def updateText(self):
|
||||||
|
if self.preview > 1:
|
||||||
|
return
|
||||||
|
b1, b2 = self.app.stats.gameid_balance, 0
|
||||||
|
if self.shallUpdateBalance():
|
||||||
|
b2 = self.getGameBalance()
|
||||||
|
t = _("Balance $%d") % (b1 + b2)
|
||||||
|
self.texts.score.config(text=t)
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Eagle Wing
|
# * Eagle Wing
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
@ -948,3 +974,5 @@ registerGame(GameInfo(642, Lafayette, "Lafayette",
|
||||||
GI.GT_CANFIELD, 1, -1, GI.SL_BALANCED))
|
GI.GT_CANFIELD, 1, -1, GI.SL_BALANCED))
|
||||||
registerGame(GameInfo(789, Beehive, "Beehive",
|
registerGame(GameInfo(789, Beehive, "Beehive",
|
||||||
GI.GT_CANFIELD, 1, -1, GI.SL_BALANCED))
|
GI.GT_CANFIELD, 1, -1, GI.SL_BALANCED))
|
||||||
|
registerGame(GameInfo(835, CasinoCanfield, "Casino Canfield",
|
||||||
|
GI.GT_CANFIELD | GI.GT_SCORE, 1, 0, GI.SL_BALANCED))
|
||||||
|
|
Loading…
Add table
Reference in a new issue