Shahrayar123 / Python-Projects

Basic Python projects, good first issue
286 stars 284 forks source link

Used Surface.fill for higher efficiency #98

Closed aravindsomaraj closed 8 months ago

aravindsomaraj commented 12 months ago

In the update function, instead of calling pygame.draw.rect for each cell, which can be a bit slow for larger grids, we can use pygame.Surface.fill to fill the entire screen with the appropriate colors for each cell state. This can be more efficient for rendering large grids.