AI_PROJECT/Climate.py

49 lines
973 B
Python
Raw Normal View History

#THESE DICTIONARIES ARE USED FOR DISPLAY AND FOR DOCUMENTATION PURPOSES
2024-05-10 18:33:38 +02:00
seasons={
0:"zima",
1:"wiosna",
2:"lato",
3:"jesien"}
2024-05-10 18:33:38 +02:00
time={
0:"rano",
1:"poludnie",
2:"wieczor",
3:"noc"}
rain={
0:"brak",
1:"lekki deszcz",
2:"normalny deszcz",
3:"ulewa"
}
2024-05-10 18:33:38 +02:00
temperature={
0:"bardzo zimno",
1:"zimno",
2:"przecietnie",
3:"cieplo",
4:"upal",}
2024-05-10 18:33:38 +02:00
def getNextSeason(season):
if(season==3):
return 0
else:
return season+1
2024-05-10 18:33:38 +02:00
def getNextTime(currentTime):
if(currentTime==3):
return 0
else:
return currentTime+1
def getAmount(type):
if(type=="seasons"):
return len(seasons)
if(type=="rain"):
return len(rain)
if(type=="time"):
return len(time)
if(type=="temperature"):
return len(temperature)