""" 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 = {}
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.
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)