diff --git a/README b/README index 09c16afb..a07b15d3 100644 --- a/README +++ b/README @@ -9,13 +9,13 @@ Requirements. - Tkinter ** for sound support (not necessarily) ** -- PySol-Sound-Server: http://www.pysol.org/ -or -- PyGame: http://www.pygame.org/ + - PySol-Sound-Server: http://www.pysol.org/ (mp3, wav, tracker music) + or + - PyGame: http://www.pygame.org/ (mp3, ogg, wav, midi, tracker music) ** other modules (not necessarily) ** -- PIL (Python Image Library): http://www.pythonware.com/products/pil -- Freecell Solver: http://vipe.technion.ac.il/~shlomif/freecell-solver/ + - PIL (Python Image Library): http://www.pythonware.com/products/pil + - Freecell Solver: http://vipe.technion.ac.il/~shlomif/freecell-solver/ Installation. diff --git a/pysollib/games/grandduchess.py b/pysollib/games/grandduchess.py index 72027fc5..e52c21db 100644 --- a/pysollib/games/grandduchess.py +++ b/pysollib/games/grandduchess.py @@ -130,6 +130,9 @@ class GrandDuchess(Game): self.s.talon.dealRow() self.s.talon.dealRow(rows=[self.s.reserves[1]], flip=0) + def redealCards(self): + pass + def getAutoStacks(self, event=None): return ((), (), self.sg.dropstacks) diff --git a/pysollib/move.py b/pysollib/move.py index 86920afa..af78da62 100644 --- a/pysollib/move.py +++ b/pysollib/move.py @@ -490,7 +490,7 @@ class ASingleCardMove(AtomicMove): game.animatedMoveTo(from_stack, to_stack, [card], x, y, frames=self.frames, shadow=self.shadow) to_stack.addCard(card) - stack.refreshView() + ##to_stack.refreshView() def undo(self, game): from_stack = game.allstacks[self.from_stack_id] @@ -502,7 +502,7 @@ class ASingleCardMove(AtomicMove): ## game.animatedMoveTo(from_stack, to_stack, [card], x, y, ## frames=self.frames, shadow=self.shadow) from_stack.insertCard(card, from_pos) - stack.refreshView() + ##to_stack.refreshView() def cmpForRedo(self, other): return cmp((self.from_stack_id, self.to_stack_id, self.from_pos), diff --git a/pysollib/stack.py b/pysollib/stack.py index 4b91f85b..f1c178e9 100644 --- a/pysollib/stack.py +++ b/pysollib/stack.py @@ -921,7 +921,9 @@ class Stack: if drag.cards: if sound: 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) def moveCardsBackHandler(self, event, drag): @@ -2434,8 +2436,13 @@ class ArbitraryStack(OpenStack): def startDrag(self, event, sound=1): OpenStack.startDrag(self, event, sound=sound) - for c in self.cards[self.game.drag.index+1:]: - c.moveBy(0, -self.CARD_YOFFSET[0]) + if self.game.app.opt.mouse_type == 'point-n-click': + 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): # flip or drop a card @@ -2455,6 +2462,7 @@ class ArbitraryStack(OpenStack): return 1 return 0 + def moveCardsBackHandler(self, event, drag): i = self.cards.index(drag.cards[0]) for card in self.cards[i:]: