We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf422b1 commit adcc4ffCopy full SHA for adcc4ff
cellular_automata/wa_tor.py
@@ -204,7 +204,7 @@ def balance_predators_and_prey(self) -> None:
204
205
if len(entities) >= MAX_ENTITIES - MAX_ENTITIES / 10:
206
prey = [entity for entity in entities if entity.prey]
207
- predators = list(filter(lambda entity: entity.prey is True, entities))
+ predators = [entity for entity in entities if not entity.prey]
208
209
prey_count, predator_count = len(prey), len(predators)
210
0 commit comments