- n_seats = 6
- d_theta = 2 * math.pi / n_seats
- return [
- Seat(
- vehicle=self,
- pos=(math.sin(i * d_theta), math.cos(i * d_theta)))
- for i in range(n_seats)
- ]
+ return circle_of_seats(6, vehicle=self)
+
+ def get_avatar(self, world):
+ weapon = default_weapons.assemble(
+ world.weapons.current, tape=self.weapons_taped_on)
+ num_roaches = len(world.roaches)
+ roach = WorldRoach()
+ if num_roaches == 1:
+ # Return a single large roach
+ avatar = default_roaches.assemble(roach, weapon=weapon)
+ avatar.anchor = (0, 0)
+ elif num_roaches < 6:
+ avatar = roaches_quartet.assemble(roach, weapon=weapon)
+ avatar.anchor = (0, 0)
+ else:
+ avatar = roaches_nonet.assemble(roach, weapon=weapon)
+ avatar.anchor = (0, 0)
+ return avatar