Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--game.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/game.py b/game.py
index dfc5153..82c276c 100644
--- a/game.py
+++ b/game.py
@@ -35,11 +35,6 @@ LINE_WIDTH = 12
BACKGROUND_COLOR = (0, 1, 0)
class Canvas(Gtk.DrawingArea):
-
- __gsignals__ = {'cross-added': (GObject.SignalFlags.RUN_FIRST, None, [int]),
- 'circle-added': (GObject.SignalFlags.RUN_FIRST,
- None, [int])}
-
def __init__(self):
GObject.GObject.__init__(self)
@@ -57,4 +52,13 @@ class Canvas(Gtk.DrawingArea):
context.set_source_rgb(*BACKGROUND_COLOR)
context.fill()
+ def _get_route(self, direction, pos_x, pos_y):
+ if direction == 'horizontal':
+ x = alloc.width
+ else:
+ x = alloc.height
+
+ context.rectangle(pos_x, pos_y, x, 50)
+ context.set_source_rgb(0.803921569, 0.788235294, 0.788235294)
+ context.fill()