The Factory Method
Deferring the creation of spirits to spectral subclasses.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Factory Method
ARCANUM SCHOOL: Necromancy // Spirit Binding
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// BARE METAL ARCHITECTURE RUNE //
section .data
specter_type db 1
section .text
global _start
_start:
mov al, [specter_type]
call factory_method
mov rax, 60
xor rdi, rdi
syscall
factory_method:
cmp al, 1
je create_poltergeist
jmp create_banshee
create_poltergeist:
; Poltergeist routine
ret
create_banshee:
; Banshee routine
ret
Through the Factory Method, a generalized subroutine delegates the exact instantiation of spectral entities. By checking an environmental variable or state flag, the ritual dynamically selects the proper summoning sequence.
Runic Tags:
#factory-method
#assembly
#creational
#necromancy