Implement grow method and harvest function
This commit is contained in:
@@ -6,3 +6,7 @@ class FarmAgent:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_manual():
|
def get_manual():
|
||||||
return "Инструкция: pH 6.0"
|
return "Инструкция: pH 6.0"
|
||||||
|
|
||||||
|
def harvest(self):
|
||||||
|
ready = [c for c in self._module.cultures if c._stage == "Красный"]
|
||||||
|
return len(ready)
|
||||||
|
|||||||
+2
-2
@@ -4,8 +4,8 @@ class BioCulture:
|
|||||||
self._stage = "Зеленый"
|
self._stage = "Зеленый"
|
||||||
|
|
||||||
def grow(self):
|
def grow(self):
|
||||||
# Заглушка, которая вызовет конфликт
|
# Рабочий код вместо исключения
|
||||||
raise NotImplementedError("Рост не реализован в main!")
|
self._stage = "Красный"
|
||||||
|
|
||||||
|
|
||||||
class HydroponicModule:
|
class HydroponicModule:
|
||||||
|
|||||||
Reference in New Issue
Block a user