From e3784691ff5369873f0b82c9bcfa8b0a735de754 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Thu, 21 May 2009 07:03:58 +0200 Subject: * host/simu/robots/aquajim: - added elevator puck slots. - added lost puck display. --- host/simu/robots/aquajim/view/elevator.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'host/simu/robots/aquajim/view/elevator.py') diff --git a/host/simu/robots/aquajim/view/elevator.py b/host/simu/robots/aquajim/view/elevator.py index 8c83ac5e..7c27d4d3 100644 --- a/host/simu/robots/aquajim/view/elevator.py +++ b/host/simu/robots/aquajim/view/elevator.py @@ -24,6 +24,8 @@ """AquaJim elevator.""" from simu.inter.drawable import Drawable +from simu.view.table_eurobot2009 import puck_attr + class Elevator (Drawable): width = 320 / 1.2 @@ -56,6 +58,11 @@ class Elevator (Drawable): self.reset () self.trans_translate ((-35, -150)) self.draw_line ((-10, 300), (-10, 0), (70, 0), fill = '#808080') + i = 15 + for puck in self.model.lost: + self.draw_circle ((-40, i), 15, + **puck_attr[puck.color]) + i += 15 if self.height is not None: self.trans_translate ((0, self.height)) self.draw_line ((0, 150), (0, 0), (70, 0)) @@ -63,4 +70,9 @@ class Elevator (Drawable): self.trans_translate ((5 + self.door_value * 70, 0)) self.draw_line ((0, 120), (0, 0), fill = self.door_limit and 'red' or 'black') + i = 0 + for puck in self.model.elevator_slot: + self.draw_rectangle ((0, i), (70, i + 30), + **puck_attr[puck.color]) + i += 30 -- cgit v1.2.3