>>> Entity(prey=True, coords=(1, 1)) Entity(prey=True, coords=(1, 1), remaining_reproduction_time=5) >>> Entity(prey=False, coords=(2, 1)) # doctest: +NORMALIZE_WHITESPACE Entity(prey=False, coords=(2, 1), remaining_reproduction_time=20, energy_value=15)
(self)
| 75 | ) |
| 76 | |
| 77 | def __repr__(self) -> str: |
| 78 | """ |
| 79 | >>> Entity(prey=True, coords=(1, 1)) |
| 80 | Entity(prey=True, coords=(1, 1), remaining_reproduction_time=5) |
| 81 | >>> Entity(prey=False, coords=(2, 1)) # doctest: +NORMALIZE_WHITESPACE |
| 82 | Entity(prey=False, coords=(2, 1), |
| 83 | remaining_reproduction_time=20, energy_value=15) |
| 84 | """ |
| 85 | repr_ = ( |
| 86 | f"Entity(prey={self.prey}, coords={self.coords}, " |
| 87 | f"remaining_reproduction_time={self.remaining_reproduction_time}" |
| 88 | ) |
| 89 | if self.energy_value is not None: |
| 90 | repr_ += f", energy_value={self.energy_value}" |
| 91 | return f"{repr_})" |
| 92 | |
| 93 | |
| 94 | class WaTor: |
nothing calls this directly
no outgoing calls
no test coverage detected