project/grid.py
def update(self, dead, live, surface):
        """
        Updates cells color correlating to dead or live
        """
        for x in range(self.rows):
            for y in range(self.columns):
                x_pos, y_pos = x * self.scale, y * self.scale
                if self.curr_array[x][y] == 1:
                    pygame.draw.rect(surface, live,
                                     [x_pos, y_pos, self.scale - self.border, self.scale - self.border])
                else:
                    pygame.draw.rect(surface, dead,
                                     [x_pos, y_pos, self.scale - self.border, self.scale - self.border])

        Updates cells color correlating to dead or live
        
Updates cells color correlating to dead or live
Updates cells color correlating to dead or live
def update(self, dead, live, surface):
        for x in range(self.rows):
            for y in range(self.columns):
                x_pos, y_pos = x * self.scale, y * self.scale
                if self.curr_array[x][y] == 1:
                    pygame.draw.rect(surface, live,
                                     [x_pos, y_pos, self.scale - self.border, self.scale - self.border])
                else:
                    pygame.draw.rect(surface, dead,
                                     [x_pos, y_pos, self.scale - self.border, self.scale - self.border])
def update ( self , dead , live , surface ) : for x in range ( self . rows ) : for y in range ( self . columns ) : x_pos , y_pos = x * self . scale , y * self . scale if self . curr_array [ x ] [ y ] == 1 : pygame . draw . rect ( surface , live , [ x_pos , y_pos , self . scale - self . border , self . scale - self . border ] ) else : pygame . draw . rect ( surface , dead , [ x_pos , y_pos , self . scale - self . border , self . scale - self . border ] )
Updates cells color correlating to dead or live
Updates cells color correlating to dead or live
"""
        Updates cells color correlating to dead or live
        """
self
dead
live
surface