The Singleton
Guaranteeing a single Lich King controls the execution flow.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Singleton
ARCANUM SCHOOL: Necromancy // Phylactery Binding
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// BARE METAL ARCHITECTURE RUNE //
section .bss
lich_instance resq 1
section .text
global get_lich
get_lich:
mov rax, [lich_instance]
test rax, rax
jnz .done
; Initialize the Lich King
mov qword [lich_instance], 0xDEADBEEF
mov rax, [lich_instance]
.done:
ret
The Singleton pattern binds a singular instance of an entity to a global phylactery (memory address). Any subsequent attempts to summon the Lich King will yield the very same entity, ensuring absolute central dominion over the dark domain.
Runic Tags:
#singleton
#assembly
#creational
#necromancy