mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
* bugs fixes
git-svn-id: https://pysolfc.svn.sourceforge.net/svnroot/pysolfc/PySolFC/trunk@69 39dd0a4e-7c14-0410-91b3-c4f2d318f732
This commit is contained in:
parent
27fe3c93b4
commit
87da6cc7a3
4 changed files with 21 additions and 10 deletions
10
README
10
README
|
@ -9,13 +9,13 @@ Requirements.
|
||||||
- Tkinter
|
- Tkinter
|
||||||
|
|
||||||
** for sound support (not necessarily) **
|
** for sound support (not necessarily) **
|
||||||
- PySol-Sound-Server: http://www.pysol.org/
|
- PySol-Sound-Server: http://www.pysol.org/ (mp3, wav, tracker music)
|
||||||
or
|
or
|
||||||
- PyGame: http://www.pygame.org/
|
- PyGame: http://www.pygame.org/ (mp3, ogg, wav, midi, tracker music)
|
||||||
|
|
||||||
** other modules (not necessarily) **
|
** other modules (not necessarily) **
|
||||||
- PIL (Python Image Library): http://www.pythonware.com/products/pil
|
- PIL (Python Image Library): http://www.pythonware.com/products/pil
|
||||||
- Freecell Solver: http://vipe.technion.ac.il/~shlomif/freecell-solver/
|
- Freecell Solver: http://vipe.technion.ac.il/~shlomif/freecell-solver/
|
||||||
|
|
||||||
|
|
||||||
Installation.
|
Installation.
|
||||||
|
|
|
@ -130,6 +130,9 @@ class GrandDuchess(Game):
|
||||||
self.s.talon.dealRow()
|
self.s.talon.dealRow()
|
||||||
self.s.talon.dealRow(rows=[self.s.reserves[1]], flip=0)
|
self.s.talon.dealRow(rows=[self.s.reserves[1]], flip=0)
|
||||||
|
|
||||||
|
def redealCards(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def getAutoStacks(self, event=None):
|
def getAutoStacks(self, event=None):
|
||||||
return ((), (), self.sg.dropstacks)
|
return ((), (), self.sg.dropstacks)
|
||||||
|
|
|
@ -490,7 +490,7 @@ class ASingleCardMove(AtomicMove):
|
||||||
game.animatedMoveTo(from_stack, to_stack, [card], x, y,
|
game.animatedMoveTo(from_stack, to_stack, [card], x, y,
|
||||||
frames=self.frames, shadow=self.shadow)
|
frames=self.frames, shadow=self.shadow)
|
||||||
to_stack.addCard(card)
|
to_stack.addCard(card)
|
||||||
stack.refreshView()
|
##to_stack.refreshView()
|
||||||
|
|
||||||
def undo(self, game):
|
def undo(self, game):
|
||||||
from_stack = game.allstacks[self.from_stack_id]
|
from_stack = game.allstacks[self.from_stack_id]
|
||||||
|
@ -502,7 +502,7 @@ class ASingleCardMove(AtomicMove):
|
||||||
## game.animatedMoveTo(from_stack, to_stack, [card], x, y,
|
## game.animatedMoveTo(from_stack, to_stack, [card], x, y,
|
||||||
## frames=self.frames, shadow=self.shadow)
|
## frames=self.frames, shadow=self.shadow)
|
||||||
from_stack.insertCard(card, from_pos)
|
from_stack.insertCard(card, from_pos)
|
||||||
stack.refreshView()
|
##to_stack.refreshView()
|
||||||
|
|
||||||
def cmpForRedo(self, other):
|
def cmpForRedo(self, other):
|
||||||
return cmp((self.from_stack_id, self.to_stack_id, self.from_pos),
|
return cmp((self.from_stack_id, self.to_stack_id, self.from_pos),
|
||||||
|
|
|
@ -921,7 +921,9 @@ class Stack:
|
||||||
if drag.cards:
|
if drag.cards:
|
||||||
if sound:
|
if sound:
|
||||||
self.game.playSample("nomove")
|
self.game.playSample("nomove")
|
||||||
if not self.game.app.opt.mouse_type == 'point-n-click':
|
if self.game.app.opt.mouse_type == 'point-n-click':
|
||||||
|
drag.stack.moveCardsBackHandler(event, drag)
|
||||||
|
else:
|
||||||
self.moveCardsBackHandler(event, drag)
|
self.moveCardsBackHandler(event, drag)
|
||||||
|
|
||||||
def moveCardsBackHandler(self, event, drag):
|
def moveCardsBackHandler(self, event, drag):
|
||||||
|
@ -2434,8 +2436,13 @@ class ArbitraryStack(OpenStack):
|
||||||
|
|
||||||
def startDrag(self, event, sound=1):
|
def startDrag(self, event, sound=1):
|
||||||
OpenStack.startDrag(self, event, sound=sound)
|
OpenStack.startDrag(self, event, sound=sound)
|
||||||
for c in self.cards[self.game.drag.index+1:]:
|
if self.game.app.opt.mouse_type == 'point-n-click':
|
||||||
c.moveBy(0, -self.CARD_YOFFSET[0])
|
self.cards[self.game.drag.index].tkraise()
|
||||||
|
self.game.drag.shadows[0].tkraise()
|
||||||
|
else:
|
||||||
|
for c in self.cards[self.game.drag.index+1:]:
|
||||||
|
c.moveBy(0, -self.CARD_YOFFSET[0])
|
||||||
|
|
||||||
|
|
||||||
def doubleclickHandler(self, event):
|
def doubleclickHandler(self, event):
|
||||||
# flip or drop a card
|
# flip or drop a card
|
||||||
|
@ -2455,6 +2462,7 @@ class ArbitraryStack(OpenStack):
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def moveCardsBackHandler(self, event, drag):
|
def moveCardsBackHandler(self, event, drag):
|
||||||
i = self.cards.index(drag.cards[0])
|
i = self.cards.index(drag.cards[0])
|
||||||
for card in self.cards[i:]:
|
for card in self.cards[i:]:
|
||||||
|
|
Loading…
Add table
Reference in a new issue