dimanche 24 novembre 2019

Select random iamgine from list using pygame

So, I want to select a random image from a list. I imported all the images and made a list with all of the names(of the imported images). I am using random.choice to get a name from that list but when I run it, everything goes black. Here is the my the full code: https://pastebin.com/Eff7M573 I am posting to pastebin since i cant post the question on stack overflow because there will be too much code.

    list = [one,two,three,four,five,six,seven,eight,nine,ten]
    image = random.choice(list), (y,x))
    rect = image.get_rect()
    screen.blit(image, (y,x))```




Aucun commentaire:

Enregistrer un commentaire