​python_modules /
module-07 / ex1 / factories.py
106 commits
21-05-2026
23 lines 503 B
 1from ex0 import Creature, CreatureFactory
 2from ._creatures import (
 3    Sproutling,
 4    Bloomelle,
 5    Shiftling,
 6    Morphagon
 7)
 8
 9
10class HealingCreatureFactory(CreatureFactory):
11    def create_base(self) -> Creature:
12        return Sproutling()
13
14    def create_evolved(self) -> Creature:
15        return Bloomelle()
16
17
18class TransformCreatureFactory(CreatureFactory):
19    def create_base(self) -> Creature:
20        return Shiftling()
21
22    def create_evolved(self) -> Creature:
23        return Morphagon()