refactor #26
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user