State: The Turtle's Trance
Alter the turtle's fundamental behavior based on its internal trance state—seeking, tracing, or dormant.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: State
ARCANUM SCHOOL: Transmutation // Trance
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// LOGO PATTERN //
make "turtle-state "seeking
to trance-move :dist
if equal? :turtle-state "seeking [ pu fd :dist pd ]
if equal? :turtle-state "tracing [ setpencolor [255 0 255] fd :dist ]
if equal? :turtle-state "dormant [ print [The turtle dreams...] ]
end
to change-state :new-state
make "turtle-state :new-state
end
; Divination sequence
trance-move 50
change-state "tracing
trance-move 50
change-state "dormant
trance-move 50
Runic Tags:
#turtle-divination
#state-machine