1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

+ 1 new game

git-svn-id: https://pysolfc.svn.sourceforge.net/svnroot/pysolfc/PySolFC/trunk@135 39dd0a4e-7c14-0410-91b3-c4f2d318f732
This commit is contained in:
skomoroh 2007-01-19 22:26:57 +00:00
parent c8468187a2
commit 9dc3e194af
3 changed files with 88 additions and 10 deletions

View file

@ -0,0 +1,24 @@
<h1>Diamond Mine</h1>
<p>
One-Deck game type. 1 deck. No redeal.
<h3>Object</h3>
<p>
Remove all diamonds to the foundation and have all the other cards in suit and
sequence with Aces being low in the Tableau.
<h3>Rules</h3>
<p>
Cards (other than diamonds) can be built down in sequence regardless of suit.
Builds of cards can be moved as a unit. Empty slots can be filled by any card
(except for diamonds) or build of cards.
<p>
Diamonds cannot be moved except to be place on to the Foundation. The diamond
Foundation must be built up in sequence but can start from any number you
want.
<h3>Strategy</h3>
<p>
Mining for diamonds is hard work. Keep in mind that not all diamonds are worth
the same. Don't forget to clean up after yourself and put the other suits in
order.

View file

@ -986,6 +986,7 @@ class Game:
shadow = self.app.opt.shadow shadow = self.app.opt.shadow
shadows = () shadows = ()
# start animation # start animation
from_stack._unshadeStack()
if tkraise: if tkraise:
for card in cards: for card in cards:
card.tkraise() card.tkraise()

View file

@ -32,7 +32,6 @@
__all__ = [] __all__ = []
# imports # imports
import sys
# PySol imports # PySol imports
from pysollib.gamedb import registerGame, GameInfo, GI from pysollib.gamedb import registerGame, GameInfo, GI
@ -288,8 +287,8 @@ class SimpleSimon(Spider):
Spider.createGame(self, rows=10, texts=0) Spider.createGame(self, rows=10, texts=0)
def startGame(self): def startGame(self):
for l in (9, 8, 7, 6, 5, 4, 3): for i in (9, 8, 7, 6, 5, 4, 3):
self.s.talon.dealRow(rows=self.s.rows[:l], frames=0) self.s.talon.dealRow(rows=self.s.rows[:i], frames=0)
self.startDealSample() self.startDealSample()
self.s.talon.dealRow() self.s.talon.dealRow()
@ -770,12 +769,12 @@ class SpiderWeb(RelaxedSpider):
x += 2*l.XS x += 2*l.XS
s.reserves.append(ReserveStack(x, y, self)) s.reserves.append(ReserveStack(x, y, self))
x += 2*l.XS x += 2*l.XS
for r in range(4): for i in range(4):
s.foundations.append(Spider_SS_Foundation(x, y, self, s.foundations.append(Spider_SS_Foundation(x, y, self,
suit=ANY_SUIT)) suit=ANY_SUIT))
x += l.XS x += l.XS
x, y = l.XM+l.XS, l.YM+l.YS x, y = l.XM+l.XS, l.YM+l.YS
for r in range(7): for i in range(7):
s.rows.append(Spider_RowStack(x, y, self, s.rows.append(Spider_RowStack(x, y, self,
base_rank=ANY_RANK)) base_rank=ANY_RANK))
x += l.XS x += l.XS
@ -803,8 +802,8 @@ class SimonJester(Spider):
Spider.createGame(self, rows=14, texts=0) Spider.createGame(self, rows=14, texts=0)
def startGame(self): def startGame(self):
for l in range(1, 14): for i in range(1, 14):
self.s.talon.dealRow(rows=self.s.rows[:l], frames=0) self.s.talon.dealRow(rows=self.s.rows[:i], frames=0)
self.startDealSample() self.startDealSample()
self.s.talon.dealRow(rows=self.s.rows[1:]) self.s.talon.dealRow(rows=self.s.rows[1:])
@ -873,7 +872,7 @@ class BigSpider(Spider):
def createGame(self): def createGame(self):
Spider.createGame(self, rows=13, playcards=28) Spider.createGame(self, rows=13, playcards=28)
def startGame(self): def startGame(self):
for l in range(5): for i in range(5):
self.s.talon.dealRow(frames=0, flip=0) self.s.talon.dealRow(frames=0, flip=0)
self.startDealSample() self.startDealSample()
self.s.talon.dealRow() self.s.talon.dealRow()
@ -887,7 +886,7 @@ class BigSpider2Suits(BigSpider):
class Spider3x3(BigSpider): class Spider3x3(BigSpider):
def startGame(self): def startGame(self):
for l in range(4): for i in range(4):
self.s.talon.dealRow(frames=0, flip=0) self.s.talon.dealRow(frames=0, flip=0)
self.startDealSample() self.startDealSample()
self.s.talon.dealRow() self.s.talon.dealRow()
@ -946,7 +945,7 @@ class ChineseSpider(Spider):
def createGame(self): def createGame(self):
Spider.createGame(self, rows=12, playcards=28) Spider.createGame(self, rows=12, playcards=28)
def startGame(self): def startGame(self):
for l in range(5): for i in range(5):
self.s.talon.dealRow(frames=0, flip=0) self.s.talon.dealRow(frames=0, flip=0)
self.startDealSample() self.startDealSample()
self.s.talon.dealRow() self.s.talon.dealRow()
@ -1197,6 +1196,58 @@ class FechtersGame(RelaxedSpider):
shallHighlightMatch = Game._shallHighlightMatch_AC shallHighlightMatch = Game._shallHighlightMatch_AC
# /***********************************************************************
# // Bebop
# ************************************************************************/
class Bebop(Game):
def createGame(self):
l, s = Layout(self), self.s
self.setSize(l.XM+10*l.XS, l.YM+2*l.YS+18*l.YOFFSET)
x, y = l.XM+2*l.XS, l.YM
for i in range(8):
s.foundations.append(SS_FoundationStack(x, y, self, suit=i/2))
x += l.XS
x, y = l.XM+l.XS, l.YM+l.YS
for i in range(8):
s.rows.append(RK_RowStack(x, y, self))
x += l.XS
x, y = l.XM, l.YM
s.talon = TalonStack(x, y, self)
l.createText(s.talon, 'ne')
l.defaultStackGroups()
def startGame(self):
for i in range(len(self.s.rows)-1):
self.s.talon.dealRow(frames=0, flip=0)
self.startDealSample()
self.s.talon.dealRow()
def fillStack(self, stack):
if stack in self.s.rows:
if len(stack.cards) == len(self.s.rows)-1:
for c in stack.cards:
if c.face_up:
return
old_state = self.enterState(self.S_FILL)
for s in self.s.rows:
if s is stack:
continue
stack.flipMove()
stack.moveMove(1, s, frames=4)
for i in range(len(self.s.rows)-1):
if self.s.talon.cards:
self.s.talon.dealRow(rows=[stack], frames=4, flip=0)
if self.s.talon.cards:
self.s.talon.dealRow(rows=[stack])
self.leaveState(old_state)
shallHighlightMatch = Game._shallHighlightMatch_RK
# register the game # register the game
registerGame(GameInfo(10, RelaxedSpider, "Relaxed Spider", registerGame(GameInfo(10, RelaxedSpider, "Relaxed Spider",
@ -1317,4 +1368,6 @@ registerGame(GameInfo(680, Tarantula, "Tarantula",
GI.GT_SPIDER, 2, 0, GI.SL_MOSTLY_SKILL)) GI.GT_SPIDER, 2, 0, GI.SL_MOSTLY_SKILL))
registerGame(GameInfo(685, FechtersGame, "Fechter's Game", registerGame(GameInfo(685, FechtersGame, "Fechter's Game",
GI.GT_SPIDER, 2, 0, GI.SL_MOSTLY_SKILL)) GI.GT_SPIDER, 2, 0, GI.SL_MOSTLY_SKILL))
registerGame(GameInfo(710, Bebop, "Bebop",
GI.GT_2DECK_TYPE | GI.GT_ORIGINAL, 2, 0, GI.SL_MOSTLY_SKILL))