IDE3 #12

Merged
s473556 merged 8 commits from IDE3 into main 2023-06-01 17:40:17 +02:00
10 changed files with 7 additions and 4 deletions
Showing only changes of commit 7d0e773b7a - Show all commits

Binary file not shown.

View File

@ -73,9 +73,10 @@ if isinstance(this_contain, Plant):
print(decision) print(decision)
if decision == 1: if decision == 1:
# Tractor.collect(self=tractor, plant_group=plant_group) # Tractor.collect(self=tractor, plant_group=plant_group)
print('Gotowe do zbioru') print('Gotowe do zbioru')
else: else:
print('nie zbieramy') # decision = 1
print('nie zbieramy')
else: else:
print('Road, no plant growing') print('Road, no plant growing')
@ -106,6 +107,8 @@ if __name__ == "__main__":
step = moves_list.pop() # pop the last element step = moves_list.pop() # pop the last element
moves = tuple(moves_list) # convert back to tuple moves = tuple(moves_list) # convert back to tuple
tractor.movement(step[0]) tractor.movement(step[0])
if (tractor.rect.x, tractor.rect.y) == destination and decision == 1:
tractor.collect(plant_group)
Tractor.movement_using_keys(tractor) Tractor.movement_using_keys(tractor)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -73,11 +73,11 @@ def seedForFirstTime():
# wzrost;wilgotnosc;dni_od_nawiezienia;aktualna_pogoda;czy_roslina_robaczywa;typ_rosliny;pojemnosc_ekwipunku;cena_sprzedarzy;czy_zebrac # wzrost;wilgotnosc;dni_od_nawiezienia;aktualna_pogoda;czy_roslina_robaczywa;typ_rosliny;pojemnosc_ekwipunku;cena_sprzedarzy;czy_zebrac
new_plant = Plant( new_plant = Plant(
wzrost=random.randint(20, 100), wzrost=random.randint(90, 100),
wilgotnosc=random.randint(0, 100), wilgotnosc=random.randint(0, 100),
dni_od_nawiezienia=random.randint(0, 31), dni_od_nawiezienia=random.randint(0, 31),
aktualna_pogoda=random.randint(1,4), aktualna_pogoda=random.randint(1,4),
czy_robaczywa=random.randint(0, 1), czy_robaczywa=0,
cena_sprzedarzy=random.randint(1000, 2000), cena_sprzedarzy=random.randint(1000, 2000),
species=plant_name, species=plant_name,
pos_x=x, pos_x=x,