lundi 4 avril 2016

python/pygame - how to display images randomly?

I'm new to coding, need help displaying one of the images at random on the screen. This is what I have so far...

number_two = pygame.image.load("two.png")
number_three = pygame.image.load("three.png")
number_four = pygame.image.load("four.png")



display_number = number_list(random.randint(0, 3))
display_number = pygame.transform.scale(display_number, 70, 80)

I have an error message saying: display_number = number_list(random.randint(0, 3)) TypeError: 'list' object is not callable




Aucun commentaire:

Enregistrer un commentaire