|
|
1.1 ! root 1: # Version for the Wyse75. ! 2: procedure main(x) ! 3: i := x[1] | 1000 # "length of pattern" ! 4: j := x[2] | 2000 # steady state time ! 5: r := 0 # with credits to sbw ! 6: ran1 := create 2(&random :=: r, |?(24 | 80), &random <-> r) ! 7: ran2 := ^ran1 ! 8: clear() ! 9: every 1 to i do # start up the universe ! 10: place(ran1,"*") ! 11: every 1 to j do { # steady state condition ! 12: place(ran2," ") # clean up the beginning ! 13: place(ran1,"*") # create more ! 14: } ! 15: every 1 to i do # and the universe dies ! 16: place(ran2," ") # clean up the end ! 17: clear() ! 18: end ! 19: ! 20: procedure clear() ! 21: write(image("\^[[2J\^[[1;1;H")) # remove image and change write ! 22: # to writes for the real thing. ! 23: end ! 24: ! 25: procedure place(e,s) ! 26: write(image("\^[["),@e,";",@e,"H",s) # remove image and change write to ! 27: # writes for the real thing. ! 28: end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.