Use Wolfram's standard convention for rule names

darcs
wayo.cavazos 2006-07-02 11:39:37 +00:00
parent 25e9d29c7e
commit 32657a0266
1 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@
! This will open a new window that will display a random automata rule ! This will open a new window that will display a random automata rule
! every 10 seconds. Resize the window to make the display larger. ! every 10 seconds. Resize the window to make the display larger.
REQUIRES: slate ; REQUIRES: math slate ;
USING: parser kernel hashtables namespaces sequences math io USING: parser kernel hashtables namespaces sequences math io
math-contrib threads strings arrays prettyprint gadgets slate ; math-contrib threads strings arrays prettyprint gadgets slate ;
@ -21,14 +21,14 @@ SYMBOL: rule
: init-rule ( -- ) 8 <hashtable> rule set ; : init-rule ( -- ) 8 <hashtable> rule set ;
: rule-keys ( -- { ... } ) : rule-keys ( -- { ... } )
{ { 0 0 0 } { { 1 1 1 }
{ 0 0 1 }
{ 0 1 0 }
{ 0 1 1 }
{ 1 0 0 }
{ 1 0 1 }
{ 1 1 0 } { 1 1 0 }
{ 1 1 1 } } ; { 1 0 1 }
{ 1 0 0 }
{ 0 1 1 }
{ 0 1 0 }
{ 0 0 1 }
{ 0 0 0 } } ;
: rule-values ( n -- { ... } ) >bin 8 CHAR: 0 pad-left >array [ 48 - ] map ; : rule-values ( n -- { ... } ) >bin 8 CHAR: 0 pad-left >array [ 48 - ] map ;