AIProjekt/Podprojekt_s444426/pumpkin_upgrade.py

26 lines
699 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 Pumpkin(Plant):
2020-06-09 15:28:02 +02:00
2020-05-26 23:15:49 +02:00
def __init__(self, collect):
super().__init__('pumpkin', 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 < 90:
return 'False'
elif 90 <= self._collect <= 110:
return 'True'
elif self._collect > 110:
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 20 <= self._collect <= 45:
return True
else:
2020-06-09 15:28:02 +02:00
return False