🐎 PONY WARD DIFFICULTY: Adept Behavioral

The Memento Ward

Capturing and restoring timelines.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Memento
ARCANUM SCHOOL: Chronomancy // State Preservation
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// PONY PATTERN //
class val TimeCrystal
  let state: String val
  new create(s: String val) => state = s

class Chronomancer
  var _current_state: String val = ""
  fun save(): TimeCrystal val => TimeCrystal(_current_state)
  fun ref restore(m: TimeCrystal val) => _current_state = m.state

The Memento Ward

Immutable Mementos (val) are a perfect fit for Chronomancy. Once captured, state snapshots cannot be tampered with.

Runic Tags: #pony #memento