diff --git a/farm_core/__init__.py b/farm_core/__init__.py new file mode 100644 index 0000000..85e73ff --- /dev/null +++ b/farm_core/__init__.py @@ -0,0 +1 @@ +# Пакет farm_core diff --git a/farm_core/agent.py b/farm_core/agent.py new file mode 100644 index 0000000..fb338da --- /dev/null +++ b/farm_core/agent.py @@ -0,0 +1,8 @@ +class FarmAgent: + def __init__(self, name, module): + self.name = name + self._module = module + + @staticmethod + def get_manual(): + return "Инструкция: pH 6.0" diff --git a/farm_core/module.py b/farm_core/module.py new file mode 100644 index 0000000..f352d64 --- /dev/null +++ b/farm_core/module.py @@ -0,0 +1,13 @@ +class BioCulture: + def __init__(self, id): + self._id = id + self._stage = "Зеленый" + + def grow(self): + # Заглушка, которая вызовет конфликт + raise NotImplementedError("Рост не реализован в main!") + + +class HydroponicModule: + def __init__(self, count): + self.cultures = [BioCulture(i) for i in range(count)] diff --git a/main.py b/main.py new file mode 100644 index 0000000..88804a0 --- /dev/null +++ b/main.py @@ -0,0 +1,8 @@ +from farm_core.module import HydroponicModule +from farm_core.agent import FarmAgent + +if __name__ == "__main__": + print(FarmAgent.get_manual()) + module = HydroponicModule(3) + agent = FarmAgent("AI-Operator", module) + # Студент должен будет написать цикл тут