The Factory Method of Soul Forging
Delegating the instantiation of soul-bound entities to specialized subclasses.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Factory Method
ARCANUM SCHOOL: Conjuration // Soul Forging
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
module FactoryMethod
type soul_type = | Warrior | Mage
type entity = { name: string; power: int }
let create_entity (t: soul_type) : entity =
match t with
| Warrior -> { name = "Blade Spirit"; power = 100 }
| Mage -> { name = "Spell Weaver"; power = 150 }
Using dependent types and ADTs to represent factory methods for generating various ethereal entities with verified baseline power levels.
Runic Tags:
#factory
#instantiation
#souls