Rotation gehört in cairoboard.py
authorJoachim Breitner <mail@joachim-breitner.de>
Wed, 23 May 2007 10:06:37 +0000 (10:06 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Wed, 23 May 2007 10:06:37 +0000 (10:06 +0000)
cairoboard.py
ozeanien.py

index a4f7267..652a868 100644 (file)
@@ -76,6 +76,12 @@ class CairoBoard(gtk.DrawingArea):
         if self.event2reset(event):
             self.emit("reset-clicked")
 
+        rot = self.pilerotclick(event)
+        if rot == 1:
+            self.board.pile.rotate_right()
+        elif rot == -1:
+            self.board.pile.rotate_left()
+
     def do_expose_event(self,widget,event):
         gc = self.window.new_gc()
         gc.set_clip_rectangle(event.area)
index 11b936b..364020a 100644 (file)
@@ -83,12 +83,6 @@ class Game:
                     self.board.hand.set_card(slot.card)
                     slot.card = None
 
-        rot = self.boarddraw.pilerotclick(event)
-        if rot == 1:
-            self.board.pile.rotate_right()
-        elif rot == -1:
-            self.board.pile.rotate_left()
-
         self.boarddraw.queue_draw()