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 .base import Vehicle, Seat
5
6
7 class Walking(Vehicle):
8
9     vehicle_type = "walking"
10
11     def init_seats(self):
12         n_seats = 6
13         d_theta = 2 * math.pi / n_seats
14         return [
15             Seat(
16                 vehicle=self,
17                 pos=(math.sin(i * d_theta), math.cos(i * d_theta)))
18             for i in range(n_seats)
19         ]