Update cellular_automata/wa_tor.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
This commit is contained in:
Caeden Perelli-Harris 2023-07-30 19:32:58 +01:00 committed by GitHub
parent a9fb2ed3fa
commit e659bd100d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -567,7 +567,7 @@ def display_visually(wt: WaTor, iter_number: int, *, colour: bool = True) -> Non
output += "\n"
entities = wt.get_entities()
prey_count = len(list(filter(lambda entity: entity.prey is True, entities)))
prey_count = sum(entity.prey for entity in entities)
print(
f"{output}\n Iteration: {iter_number} | Prey count: {prey_count} | "