The Strategy
Swapping out algorithms for extracting life force dynamically at runtime.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Strategy
ARCANUM SCHOOL: Enchantment // Mind-Control
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
STRATEGY ; Strategy Pattern in MUMPS
;
EXTRACT(PATIENT, METHOD) ;
; Using indirection to invoke the chosen strategy
D @(METHOD_"(PATIENT)")
Q
;
DRAIN(P) W "Slowly draining life from ",P,! Q
SIPHON(P) W "Rapidly siphoning soul energy from ",P,! Q
CONSUME(P) W "Instantly consuming the essence of ",P,! Q
Runic Tags:
#behavioral
#strategy
#mumps
#necromancy