Displays the boids on the graphics every time called.
(self, graphics)
| 34 | self.pointer = 0 |
| 35 | |
| 36 | def render(self, graphics): |
| 37 | "Displays the boids on the graphics every time called." |
| 38 | self.add_fish() |
| 39 | graphics.clear() |
| 40 | fish = 0 |
| 41 | for school in self.schools: |
| 42 | school.render(graphics) |
| 43 | fish += school.size() |
| 44 | graphics.write(5, 5, fish, 'white') |
| 45 | |
| 46 | def add_fish(self): |
| 47 | "Add a fish to the next school while creating more fish." |