Merge branch 'master' of ctpug.org.za:koperkapel
[koperkapel.git] / koperkapel / vehicles / walking.py
1 """ A vehicle to represent roaches on foot. """
2
3 import math
4 from pgzero.actor import Actor
5 from .base import Vehicle, Seat
6
7
8 class Walking(Vehicle):
9
10     vehicle_type = "walking"
11
12     def init_seats(self):
13         n_seats = 6
14         d_theta = 2 * math.pi / n_seats
15         return [
16             Seat(
17                 vehicle=self,
18                 pos=(math.sin(i * d_theta), math.cos(i * d_theta)))
19             for i in range(n_seats)
20         ]