Langton's Ant

Source
const w = element("w", "white")
const b = element("b", "black")

          
const wAnt = kind("wAnt")
const bAnt = kind("bAnt")

          
// R=Right, B=Bottom, L=Left, T=Top
const wL = element("wL", "red", [wAnt])
// ...7 more elements (color/facing)

          
wAnt.to(b)
bAnt.to(w)

          
w.to(wL).is(RIGHT, wB)
// ...15 more rules (color/facing/turn)

          
const langtonsAnt = create()
Read the docs
@wonderyard/vivarium