View Source Document

circute.alp

/*
 * The Circute cellular automaton, expressed in ALPACA.
 * Covered under a BSD-style license; see LICENSE for more information.
 *
 * Summer 2005: original design and definition of the Circute CA.
 * May 3 2007: added BSD license.
 */

state Space " ";
state NAND  "N";
state Wire  "="
    to Spark when
        < Spark or > Spark or ^ Spark or v Spark or
    (v NAND and (v< Wire or v> Wire)) or
    (^ NAND and (^< Wire or ^> Wire));
state Spark "#"
    to Tail when
        < Tail or > Tail or ^ Tail or v Tail or
    (v NAND and v< Spark and v> Spark) or
    (^ NAND and ^< Spark and ^> Spark);
state Tail  "-"
    to Wire.