tractor collect
This commit is contained in:
parent
d9743b7b7f
commit
7d0e773b7a
Binary file not shown.
3
main.py
3
main.py
@ -75,6 +75,7 @@ if isinstance(this_contain, Plant):
|
||||
# Tractor.collect(self=tractor, plant_group=plant_group)
|
||||
print('Gotowe do zbioru')
|
||||
else:
|
||||
# decision = 1
|
||||
print('nie zbieramy')
|
||||
|
||||
else:
|
||||
@ -106,6 +107,8 @@ if __name__ == "__main__":
|
||||
step = moves_list.pop() # pop the last element
|
||||
moves = tuple(moves_list) # convert back to tuple
|
||||
tractor.movement(step[0])
|
||||
if (tractor.rect.x, tractor.rect.y) == destination and decision == 1:
|
||||
tractor.collect(plant_group)
|
||||
|
||||
|
||||
Tractor.movement_using_keys(tractor)
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -73,11 +73,11 @@ def seedForFirstTime():
|
||||
# wzrost;wilgotnosc;dni_od_nawiezienia;aktualna_pogoda;czy_roslina_robaczywa;typ_rosliny;pojemnosc_ekwipunku;cena_sprzedarzy;czy_zebrac
|
||||
|
||||
new_plant = Plant(
|
||||
wzrost=random.randint(20, 100),
|
||||
wzrost=random.randint(90, 100),
|
||||
wilgotnosc=random.randint(0, 100),
|
||||
dni_od_nawiezienia=random.randint(0, 31),
|
||||
aktualna_pogoda=random.randint(1,4),
|
||||
czy_robaczywa=random.randint(0, 1),
|
||||
czy_robaczywa=0,
|
||||
cena_sprzedarzy=random.randint(1000, 2000),
|
||||
species=plant_name,
|
||||
pos_x=x,
|
||||
|
Loading…
Reference in New Issue
Block a user