Strategy
Encapsulate varying schools of magical combat algorithms, making them interchangeable during a duel.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Strategy
ARCANUM SCHOOL: Evocation // Tactical Weaving
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// D PATTERN //
interface CombatStrategy { void executeAttack(); }
class EvocationStrategy : CombatStrategy { override void executeAttack() {} }
class IllusionStrategy : CombatStrategy { override void executeAttack() {} }
class Duelist {
private CombatStrategy strategy;
void setStrategy(CombatStrategy s) { strategy = s; }
void attack() { strategy.executeAttack(); }
}
Interchangeable grimoires defining tactics executed seamlessly.
Runic Tags:
#behavioral
#strategy
#dlang
#algorithms