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:35:39 +01:00 committed by GitHub
parent 9d8afeb9a1
commit a87d6720d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,9 +124,9 @@ class WaTor:
# Populate planet with predators and prey randomly
for _ in range(PREY_INITIAL_COUNT):
self.add_entity(True)
self.add_entity(prey=True)
for _ in range(PREDATOR_INITIAL_COUNT):
self.add_entity(False)
self.add_entity(prey=False)
self.set_planet(self.planet)
def set_planet(self, planet: list[list[Entity | None]]) -> None: