Im trying to color a rect of a bullet, but for some reason the color isn't updating. the red_bullets and yellow_bullets are lists. here is the code:
import pygame
red_bullets = []
yellow_bullets = []
RED = (255, 0, 0)
YELLOW = (255, 255, 0)
def draw_window(red_bullets, yellow_bullets):
for bullet in red_bullets:
pygame.draw.rect(WIN, RED, bullet)
for bullet in yellow_bullets:
pygame.draw.rect(WIN, YELLOW, bullet)
pygame.display.update()
def main():
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
draw_window(red_bullets, yellow_bullets)
pygame.quit()
if __name__ == "__main__:
main()