Ableitung von CairoBoard
authormail <mail@joachim-breitner.de>
Fri, 27 Apr 2007 13:34:48 +0000 (13:34 +0000)
committermail <mail@joachim-breitner.de>
Fri, 27 Apr 2007 13:34:48 +0000 (13:34 +0000)
cairoboard.py
ozeanien.py

index b13aa0e..fd5b3e4 100644 (file)
@@ -355,4 +355,7 @@ class CairoBoard(gtk.DrawingArea):
         window.draw_drawable(window.new_gc(), self.base_pixmap, 0, 0, 0, 0,
                 2*GRIDPAD + 9*GRIDWIDTH, 2*GRIDPAD + 6*GRIDWIDTH)
 
+class GrassBoard(CairoBoard):
+    pass
+
 # vim:ts=4:sw=4:sts=4:et
index 747a788..9362561 100644 (file)
@@ -9,9 +9,10 @@ import gobject
 import cairo
 import math
 import random
+import sys
 
 from engine import * 
-from cairoboard import CairoBoard
+from cairoboard import CairoBoard, GrassBoard
 
 
 DEBUG = 1
@@ -29,7 +30,11 @@ class Game:
         self.board = Board()
         self.drag_from = None
 
-        self.boarddraw = CairoBoard(self.board)
+        if len(sys.argv) > 1 and sys.argv[1] == "sea": 
+            self.boarddraw = CairoBoard(self.board)
+        else:
+            self.boarddraw = GrassBoard(self.board)
+
         self.boarddraw.connect("button-press-event",   self.press)
         self.boarddraw.connect("button-release-event", self.release)