how to check if a rect hits an edge in pygame code example
Example: pygame check collision
def is_collided_with(self, sprite):
return self.rect.colliderect(sprite.rect)
def is_collided_with(self, sprite):
return self.rect.colliderect(sprite.rect)