Zmiana pogody pod F4
This commit is contained in:
parent
d7deb4900c
commit
81fe6f66ee
4
field.py
4
field.py
@ -44,6 +44,7 @@ class field():
|
||||
|
||||
def pogoda(self):
|
||||
number = random.randrange(0, 4)
|
||||
print(number)
|
||||
return number
|
||||
|
||||
def get_pogoda_value(self):
|
||||
@ -58,3 +59,6 @@ class field():
|
||||
return 'grad'
|
||||
elif self.weather==3:
|
||||
return 'zachmurzenie'
|
||||
|
||||
def change_weather(self):
|
||||
self.weather = self.pogoda()
|
4
main.py
4
main.py
@ -42,6 +42,10 @@ while True:
|
||||
traktor.set_mode(3)
|
||||
if key[K_p]:
|
||||
path.pathfinding(traktor,pole,UI)
|
||||
if key[K_F4]:
|
||||
#Zmiana pogody
|
||||
pole.change_weather()
|
||||
UI.pogoda()
|
||||
if key[K_F5]:
|
||||
#Dla projektu Justyny
|
||||
j.main()
|
||||
|
Loading…
Reference in New Issue
Block a user