From 586fce6d48999a1e4b2b426df5607acf46b875e3 Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Tue, 16 Jul 2024 09:35:03 +0700 Subject: [PATCH] Create exotic_energy_source_adapter.py --- src/adapters/exotic_energy_source_adapter.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/adapters/exotic_energy_source_adapter.py diff --git a/src/adapters/exotic_energy_source_adapter.py b/src/adapters/exotic_energy_source_adapter.py new file mode 100644 index 0000000..bcdf206 --- /dev/null +++ b/src/adapters/exotic_energy_source_adapter.py @@ -0,0 +1,14 @@ +import exotic_energy + +class ExoticEnergySourceAdapter(AdapterBase): + def __init__(self, exotic_energy_source): + self.exotic_energy_source = exotic_energy_source + + def connect(self): + self.exotic_energy_source.activate_exotic_energy_source() + + def disconnect(self): + self.exotic_energy_source.deactivate_exotic_energy_source() + + def get_energy_level(self): + return self.exotic_energy_source.get_exotic_energy_level()