⚙️ C++ SPELL DIFFICULTY: Adept Behavioral

The Mediator

Centralizing complex communications between covens.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Mediator
ARCANUM SCHOOL: Illusion // Telepathy
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// EXECUTABLE C++ PATTERN //
#include <string>
class Coven;
class Mediator {
public: virtual void Notify(Coven* sender, std::string event) = 0;
};
class Coven {
protected: Mediator* mediator;
public: Coven(Mediator* m) : mediator(m) {}
};
class FireCoven : public Coven {
public: FireCoven(Mediator* m) : Coven(m) {} void Act() { mediator->Notify(this, "Fire"); }
};
Runic Tags: #behavioral #mediator #cpp