ram #11

Merged
s481834 merged 21 commits from ram into master 2024-03-25 10:01:37 +01:00
Showing only changes of commit 30d81744cf - Show all commits

View File

@ -1,6 +1,37 @@
class Akcja:
srodki = [] #lista obiektów klasy Srodek
benefit = [] #lista typu string
def __init__(self, srodki, benefit):
self.srodki = srodki
self.benefit = benefit
benefits = {} #słownik typu string
def __init__(self, typ):
self.typ = typ
if self.typ == "nawodnienie":
self.srodki.append(Srodek(1, "woda", "woda"))
self.srodki.append(Srodek(1.5, "powerade", "woda")) #nawadnia lepiej niż woda
benefit["nawodnienie"] = 100
if self.typ == "zyznosc":
self.srodki.append(Srodek(2, "obornik", "nawoz"))
self.srodki.append(Srodek(3, "azotan", "nawoz"))
self.srodki.append(Srodek(4, "wapno", "nawoz"))
self.srodki.append(Srodek(5, "superfosfat", "nawoz"))
self.benefits["zyznosc"] = 100
if self.typ == "wzrost":
self.srodki.append(Srodek(6, "witaminy", "odzywka"))
self.srodki.append(Srodek(7, "aminokwasy", "odzywka"))
self.srodki.append(Srodek(8, "algi morskie", "odzywka"))
self.benefits["wzrost"] = 20
if self.typ == "grzyb":
self.srodki.append(Srodek(9, "mankozeb", "ochrona"))
self.srodki.append(Srodek(10, "czosnek", "ochrona")) #tak czosnek zabija grzyby
self.benefit["grzyb"] = "brak"
if self.typ == "wirus":
#trzeba spalić i czekać 5 lat
self.benefits["wirus"] = "brak"
if self.typ == "bakterie":
self.srodki.append(Srodek(11, "miedź", "ochrona"))
self.srodki.append(Srodek(12, "streptomycyna ", "ochrona"))
self.benefit["grzyb"] = "brak"
if self.typ == "pasożyt":
self.srodki.append(Srodek(13, "Cyjantraniliprol", "ochrona"))
self.srodki.append(Srodek(14, "Permetryna", "ochrona"))
self.srodki.append(Srodek(15, "Abamektyna", "ochrona"))
def getBenefit(self):
return self.benefits