(self, width: int, height: int)
| 116 | time_passed: Callable[["WaTor", int], None] | None |
| 117 | |
| 118 | def __init__(self, width: int, height: int) -> None: |
| 119 | self.width = width |
| 120 | self.height = height |
| 121 | self.time_passed = None |
| 122 | |
| 123 | self.planet: list[list[Entity | None]] = [[None] * width for _ in range(height)] |
| 124 | |
| 125 | # Populate planet with predators and prey randomly |
| 126 | for _ in range(PREY_INITIAL_COUNT): |
| 127 | self.add_entity(prey=True) |
| 128 | for _ in range(PREDATOR_INITIAL_COUNT): |
| 129 | self.add_entity(prey=False) |
| 130 | self.set_planet(self.planet) |
| 131 | |
| 132 | def set_planet(self, planet: list[list[Entity | None]]) -> None: |
| 133 | """ |
nothing calls this directly
no test coverage detected