From 9ebac46befe4eb6a316357437b13f153c22f9daa Mon Sep 17 00:00:00 2001 From: jakzar Date: Sun, 12 May 2024 17:34:27 +0200 Subject: [PATCH] This: -fixed a bug where tractor_water_level and move delay was called in wrong place --- Tractor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tractor.py b/Tractor.py index d154ffa..71a0ee9 100644 --- a/Tractor.py +++ b/Tractor.py @@ -173,10 +173,12 @@ class Tractor: attributes=self.get_attributes() decision = drzewo.makeDecision(attributes) self.pretty_print_tree([str("({:02d}, {:02d})").format(self.slot.x_axis, self.slot.y_axis),decision,*self.get_attributes_for_print()]) - if decision == "Podlewac": + if decision == "Tak": self.slot.irrigatePlant() counter += 1 condition.cycle() + pygame.time.delay(50) + self.waterLevel=random.randint(0,100) #condition.getCondition() self.move_forward(pole, False) if i % 2 == 0 and i != dCon.NUM_Y - 1: @@ -187,7 +189,6 @@ class Tractor: self.turn_left() self.move_forward(pole, False) self.turn_left() - pygame.time.delay(50) print("podlanych slotów: ", str(counter)) def snake_move(self,pole,x,y):