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):
8484 """
8585 for y in range (self .height ):
8686 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 ]):
8888 return False
8989
9090 return True
@@ -109,7 +109,7 @@ def _count_neighbors(self, cell):
109109 for direction in ConwaysLifeAnimation .DIRECTION_OFFSETS :
110110 try :
111111 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 ]]
113113 ):
114114 neighbors += 1
115115 except IndexError :
@@ -140,7 +140,7 @@ def draw(self):
140140 for x in range (self .width ):
141141
142142 # 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 ]):
144144 cur_cell_type = ConwaysLifeAnimation .DEAD
145145 else :
146146 cur_cell_type = ConwaysLifeAnimation .LIVE
You can’t perform that action at this time.
0 commit comments