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:29:49 +01:00 committed by GitHub
parent 06c756808a
commit 9f23c25f96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -551,9 +551,9 @@ def display_visually(wt: WaTor, iter_number: int, *, colour: bool = True) -> Non
output = ""
# Iterate over every entity in the planet
for i in range(len(planet)):
for j in range(len(planet[0])):
if (entity := planet[i][j]) is None:
for row in planet:
for entity in row:
if entity is None:
output += " . "
else:
if colour is True: