🟣 KOTLIN HEXES DIFFICULTY: Adept Structural

The Composite Hex

Treating single artifacts and chaotic swarms identically.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Composite
ARCANUM SCHOOL: Conjuration // Swarm
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// KOTLIN PATTERN //
interface MagicalEntity {
    fun trigger()
}

class Sigil : MagicalEntity {
    override fun trigger() = println("Sigil flashes")
}

class RuneCluster : MagicalEntity {
    private val entities = mutableListOf<MagicalEntity>()

    fun add(entity: MagicalEntity) = entities.add(entity)

    override fun trigger() {
        entities.forEach { it.trigger() }
    }
}

The Composite Hex

In the neon-lit astal plane, a single sigil and a massive cluster of runes should be invocable via the exact same command. The Composite hex aligns single nodes and complex branches into a unified interface tree, allowing spells to cascade recursively through the hierarchy with null-safe precision.

Runic Tags: #kotlin #structural #composite