✨ ARCANUM RUNE DIFFICULTY: Adept Structural

The Astral Bridge

Decouple an arcane abstraction from its implementation, allowing both to vary independently.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Bridge
ARCANUM SCHOOL: Conjuration // Planar Bridging
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
# The Abstraction: Spell Casting Interface
# The Implementation: Magical Elements (Fire, Void)

# Target Implementations
.PHONY: impl_fire impl_void
impl_fire:
	@echo "Channeling volatile thermal energy..."

impl_void:
	@echo "Siphoning entropy from the abyss..."

# The Abstraction uses a variable to bridge to the implementation
ELEMENT ?= fire

.PHONY: cast_blast cast_shield

cast_blast: impl_$(ELEMENT)
	@echo "Releasing a blast of $(ELEMENT)!"

cast_shield: impl_$(ELEMENT)
	@echo "Weaving a defensive ward of $(ELEMENT)!"
Runic Tags: #makefile #structural #bridge #elements