Merge old branches to refactor due to merge it with master #22

Merged
s481825 merged 20 commits from tree into refactor 2024-06-04 11:36:14 +02:00
3 changed files with 6 additions and 3 deletions
Showing only changes of commit d2d7a98a84 - Show all commits

View File

@ -1,5 +1,6 @@
import random
import Climate
import Ui
class Condition:
def __init__(self):
@ -44,4 +45,3 @@ class Condition:
def getCondition(self):
print(f"Aktualny czas: {Climate.time[self.currentTime]},opady: {Climate.rain[self.rain]},temperatura: {Climate.temperature[self.temperature]}, pora roku: {Climate.seasons[self.season]}")

View File

@ -22,4 +22,7 @@ class Drzewo:
plt.show()
def makeDecision(self,values):
action=self.tree.predict([values]) #0- nie podlewac, 1-podlewac
return action
if(action==[0]):
return "Nie podlewac"
if(action==[1]):
return "Podlewac"

View File

@ -71,7 +71,7 @@ class Tractor:
attributes=[]
attributes=attributes+slot_attributes+[self.waterLevel]+climate_attributes
print("Decyzja czy podlac:",drzewo.makeDecision(attributes),"Atrybuty tego stanu to:",attributes)
#TODO SNAKE MOVE AND USING drzewo.makeDecision(attributes)for each slot. Also we need to cycle climate for each slot change by
#TODO SNAKE MOVE AND USING drzewo.makeDecision(attributes)for each slot. Also we need to cycle climate for each slot change
#condition.cycle()
#condition.getCondition()
def turn_right(self):