File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Custom_LED_Animations/conways Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ def _is_grid_empty(self):
84
84
"""
85
85
for y in range (self .height ):
86
86
for x in range (self .width ):
87
- if not _is_pixel_off (self .pixel_grid [x , y ]):
87
+ if not _is_pixel_off (self .pixel_grid [x ][ y ]):
88
88
return False
89
89
90
90
return True
@@ -109,7 +109,7 @@ def _count_neighbors(self, cell):
109
109
for direction in ConwaysLifeAnimation .DIRECTION_OFFSETS :
110
110
try :
111
111
if not _is_pixel_off (
112
- self .pixel_grid [cell [0 ] + direction [0 ], cell [1 ] + direction [1 ]]
112
+ self .pixel_grid [cell [0 ] + direction [0 ]][ cell [1 ] + direction [1 ]]
113
113
):
114
114
neighbors += 1
115
115
except IndexError :
@@ -140,7 +140,7 @@ def draw(self):
140
140
for x in range (self .width ):
141
141
142
142
# check and set the current cell type, live or dead
143
- if _is_pixel_off (self .pixel_grid [x , y ]):
143
+ if _is_pixel_off (self .pixel_grid [x ][ y ]):
144
144
cur_cell_type = ConwaysLifeAnimation .DEAD
145
145
else :
146
146
cur_cell_type = ConwaysLifeAnimation .LIVE
You can’t perform that action at this time.
0 commit comments