Skip to content

Commit 9f23c25

Browse files
Update cellular_automata/wa_tor.py
Co-authored-by: Tianyi Zheng <[email protected]>
1 parent 06c7568 commit 9f23c25

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: cellular_automata/wa_tor.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,9 @@ def display_visually(wt: WaTor, iter_number: int, *, colour: bool = True) -> Non
551551
output = ""
552552

553553
# Iterate over every entity in the planet
554-
for i in range(len(planet)):
555-
for j in range(len(planet[0])):
556-
if (entity := planet[i][j]) is None:
554+
for row in planet:
555+
for entity in row:
556+
if entity is None:
557557
output += " . "
558558
else:
559559
if colour is True:

0 commit comments

Comments
 (0)