Place roach seats.
[koperkapel.git] / koperkapel / vehicles / base.py
index 27373a5f1eb881c658b2f00021d4e21e5482e65e..09090048d5991b449f7a8f2a7c6a0599ae0dbac1 100644 (file)
@@ -1,13 +1,15 @@
 """ Base class for vehicles.  """
 
+from pgzero.actor import Actor
+
 
 class Vehicle:
     """ Vehicle base class.
 
     A vehicle should have the following attributes:
 
-    * seats -- list of roach seats.
     * background -- actor representing background for management scene
+    * seats -- list of roach seats.
     """
 
     vehicle_types = {}
@@ -30,6 +32,7 @@ class Vehicle:
 class Seat:
     """ A space in a vehicle for a roach.
 
+    * background -- actor representing the seat.
     * pos -- (x, y) position of the seat relative to the centre of the vehicle.
       x and y may be numbers from approximately -1.0 to 1.0. They will be
       multiplied by the approximate_radius of the vehicle.
@@ -37,7 +40,8 @@ class Seat:
       seat
     """
 
-    def __init__(self, pos, allowed=None):
+    def __init__(self, actor, pos, allowed=None):
+        self.actor = actor
         self.pos = pos
         self.allowed = allowed or (lambda roach: True)