mercredi 6 septembre 2017

python, determening random numbers with jumps of 20

i have built a snake game and i did it so the sanke moves 20 pixels for each movement, now, every time i stand at the EXACT spot with the apple, it generates 2 random numbers for its next coordinates, but, if those numbers arents a multiply of 20, i simple cant stand at the exact same spot as them, like you can see at the picture here - http://ift.tt/2f4ghSK
is there a way to generate random numbers that are multiplies of 20? sorry for my english, its not my native language and thx.




Aucun commentaire:

Enregistrer un commentaire