surf = pg.Surface((200, 200), flags=HWSURFACE)
surf.fill(BGCOL)
pg.draw.rect(surf, STIMCOL, (10, 20, 40, 50))
pg.draw.rect(surf, STIMCOL, (60, 70, 80, 90))
screen.blit(surf, (100, 100))
pg.display.flip()
running = True
while running:
    surf = pg.transform.rotate(surf, -1)
screen.blit(surf, (100, 100))
pg.display.flip()
How can I rotate a group of pygame objects (either rects or images)