summaryrefslogtreecommitdiff
path: root/host/simu/view/table_eurobot2013.py
diff options
context:
space:
mode:
Diffstat (limited to 'host/simu/view/table_eurobot2013.py')
-rw-r--r--host/simu/view/table_eurobot2013.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/host/simu/view/table_eurobot2013.py b/host/simu/view/table_eurobot2013.py
index 6acd847d..abb87906 100644
--- a/host/simu/view/table_eurobot2013.py
+++ b/host/simu/view/table_eurobot2013.py
@@ -90,6 +90,19 @@ class Plate (Drawable):
self.draw_circle (c.pos, c.radius, fill = colors[c.color])
Drawable.draw (self)
+class Cherries (Drawable):
+
+ def __init__ (self, onto, model):
+ Drawable.__init__ (self, onto)
+ self.model = model
+ self.model.register (self.update)
+
+ def draw (self):
+ self.reset ()
+ for c in self.model.cherries:
+ if c.pos:
+ self.draw_circle (c.pos, c.radius, fill = colors[c.color])
+
class Gift (Drawable):
def __init__ (self, onto, model):
@@ -122,6 +135,7 @@ class Table (Drawable):
Glass (self, e)
for e in self.model.plates:
Plate (self, e)
+ Cherries (self, self.model.cherries)
for e in self.model.gifts:
Gift (self, e)