Trying to make collision detection as means to make sprites bounce off one another, but my wall sprites aren't showing up after coords (5, 5) I wasn't sure if maybe it had to do with fill and colorkey both being white, or the fact that pygame.Surface(x, y) is the same as the x, y for the rect.
Here's my wall class:
class Wall(pygame.sprite.Sprite):
def __init__(self, color, h, d, x, y):
super().__init__()
self.image = pygame.Surface([x, y])
self.image.fill(WHITE)
self.image.set_colorkey(WHITE)
pygame.draw.rect(self.image, color, [h, d, x, y])
self.rect = self.image.get_rect()
and here's my code for my call to create wall 3 an wall 4:
wall3 = Wall(BLACK, 0, 400, 700, 2)
wall_list.add(wall3)
all_sprite_list.add(wall3)
wall4 = Wall(BLACK, 700, 0, 2, 400)
wall_list.add(wall4)
all_sprite_list.add(wall4)