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
06c756808a
commit
9f23c25f96
@ -551,9 +551,9 @@ def display_visually(wt: WaTor, iter_number: int, *, colour: bool = True) -> Non
|
|||||||
output = ""
|
output = ""
|
||||||
|
|
||||||
# Iterate over every entity in the planet
|
# Iterate over every entity in the planet
|
||||||
for i in range(len(planet)):
|
for row in planet:
|
||||||
for j in range(len(planet[0])):
|
for entity in row:
|
||||||
if (entity := planet[i][j]) is None:
|
if entity is None:
|
||||||
output += " . "
|
output += " . "
|
||||||
else:
|
else:
|
||||||
if colour is True:
|
if colour is True:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user