mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 10:28:39 +00:00
Update cellular_automata/wa_tor.py
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
This commit is contained in:
parent
9d8afeb9a1
commit
a87d6720d5
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user