AIProjekt/Podprojekt_s444426/beetroot_upgrade.py

26 lines
701 B
Python
Raw Normal View History

2020-05-26 23:15:49 +02:00
from plant_upgrade import Plant
from datetime import datetime
2020-06-09 15:28:02 +02:00
2020-05-26 23:15:49 +02:00
class Beetroot(Plant):
2020-06-09 15:28:02 +02:00
2020-05-26 23:15:49 +02:00
def __init__(self, collect):
super().__init__('beetroot', collect)
2020-06-09 15:28:02 +02:00
self._wasFertilized = False # roslina nie byla nawozona przy tworzeniu
2020-05-26 23:15:49 +02:00
2020-06-09 15:28:02 +02:00
# zwraca czy zbierać rośline
2020-05-26 23:15:49 +02:00
def collect(self):
if self.have_soil():
if self._collect < 95:
return 'False'
elif 95 <= self._collect <= 115:
return 'True'
elif self._collect > 115:
return 'Delete'
2020-06-09 15:28:02 +02:00
# zwraca czy nawozić
2020-05-26 23:15:49 +02:00
def fertillizing(self):
if 35 <= self._collect <= 50:
return True
else:
2020-06-09 15:28:02 +02:00
return False