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
d277dba404
commit
9d8afeb9a1
@ -167,8 +167,8 @@ class WaTor:
|
|||||||
while True:
|
while True:
|
||||||
row, col = randint(0, self.height - 1), randint(0, self.width - 1)
|
row, col = randint(0, self.height - 1), randint(0, self.width - 1)
|
||||||
if self.planet[row][col] is None:
|
if self.planet[row][col] is None:
|
||||||
break
|
self.planet[row][col] = Entity(prey=prey, coords=(row, col))
|
||||||
self.planet[row][col] = Entity(prey=prey, coords=(row, col))
|
return
|
||||||
|
|
||||||
def get_entities(self) -> list[Entity]:
|
def get_entities(self) -> list[Entity]:
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user