poprawa randomowego ruchu
This commit is contained in:
parent
d54adddfaa
commit
41b9c016cf
10
modele.py
10
modele.py
@ -29,14 +29,14 @@ class Smieciarka(pygame.sprite.Sprite):
|
||||
HEIGHT)
|
||||
|
||||
def rand_move(self):
|
||||
rand_int = random.randint(0, 20)
|
||||
if (rand_int >= 0 and rand_int < 5):
|
||||
rand_int = random.randint(0, 3)
|
||||
if rand_int == 0:
|
||||
self.w_lewo()
|
||||
elif (rand_int >= 5 and rand_int < 10):
|
||||
elif rand_int == 1:
|
||||
self.w_prawo()
|
||||
elif (rand_int >= 10 and rand_int < 15):
|
||||
elif rand_int == 2:
|
||||
self.w_gore()
|
||||
elif (rand_int >= 15 and rand_int < 20):
|
||||
elif rand_int == 3:
|
||||
self.w_dol()
|
||||
|
||||
def w_lewo(self):
|
||||
|
Loading…
Reference in New Issue
Block a user