diff --git a/__pycache__/settings.cpython-310.pyc b/__pycache__/settings.cpython-310.pyc index 0af80cb..21c6793 100644 Binary files a/__pycache__/settings.cpython-310.pyc and b/__pycache__/settings.cpython-310.pyc differ diff --git a/main.py b/main.py index ae78dfa..22aa97e 100644 --- a/main.py +++ b/main.py @@ -73,9 +73,10 @@ if isinstance(this_contain, Plant): print(decision) if decision == 1: # Tractor.collect(self=tractor, plant_group=plant_group) - print('Gotowe do zbioru') + print('Gotowe do zbioru') else: - print('nie zbieramy') + # decision = 1 + print('nie zbieramy') else: print('Road, no plant growing') @@ -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) diff --git a/src/__pycache__/Field.cpython-310.pyc b/src/__pycache__/Field.cpython-310.pyc index a0ccddf..2e0ff0d 100644 Binary files a/src/__pycache__/Field.cpython-310.pyc and b/src/__pycache__/Field.cpython-310.pyc differ diff --git a/src/__pycache__/ID3.cpython-310.pyc b/src/__pycache__/ID3.cpython-310.pyc index ac80307..54f4893 100644 Binary files a/src/__pycache__/ID3.cpython-310.pyc and b/src/__pycache__/ID3.cpython-310.pyc differ diff --git a/src/__pycache__/Plant.cpython-310.pyc b/src/__pycache__/Plant.cpython-310.pyc index 7c7a94e..baf14b0 100644 Binary files a/src/__pycache__/Plant.cpython-310.pyc and b/src/__pycache__/Plant.cpython-310.pyc differ diff --git a/src/__pycache__/Road.cpython-310.pyc b/src/__pycache__/Road.cpython-310.pyc index 705dffa..6cbb25b 100644 Binary files a/src/__pycache__/Road.cpython-310.pyc and b/src/__pycache__/Road.cpython-310.pyc differ diff --git a/src/__pycache__/Tractor.cpython-310.pyc b/src/__pycache__/Tractor.cpython-310.pyc index 77d9d9f..4612495 100644 Binary files a/src/__pycache__/Tractor.cpython-310.pyc and b/src/__pycache__/Tractor.cpython-310.pyc differ diff --git a/src/__pycache__/bfs.cpython-310.pyc b/src/__pycache__/bfs.cpython-310.pyc index 4a30392..a493c26 100644 Binary files a/src/__pycache__/bfs.cpython-310.pyc and b/src/__pycache__/bfs.cpython-310.pyc differ diff --git a/src/__pycache__/map.cpython-310.pyc b/src/__pycache__/map.cpython-310.pyc index b957405..83dbb62 100644 Binary files a/src/__pycache__/map.cpython-310.pyc and b/src/__pycache__/map.cpython-310.pyc differ diff --git a/src/map.py b/src/map.py index 701d238..6b0241d 100644 --- a/src/map.py +++ b/src/map.py @@ -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,