There appears to be no "life", the Conway population simulation, in
comp.sources.{games|misc|unix}.  An X version was posted recently to
comp.sources.x.  If only for historical interest, perhaps there should
be one that works on standard terminals.  This version is adapted from
code written by Leor Zolman, the creator of BDS C. It compiles and runs
under SysV or BSD, using curses or termcap.

The original Leor Zolman code is in the file life.c.zolman (posted with
his permission).  It is from the late '70's and ran on 8080 hardware.

The algorithm for tracking evolution of the population is primitive, 
but a more elaborate one seems unnecessary, since 90+ percent of real 
time is spent in output.

Patterns either can be entered interactively or read from a file.  A 
starter set of data files is supplied. Some of these, in the directory 
./xpatterns, are from the X posting by Mark Moraes; the remainder, in 
./patterns, were resurrected from an 8080 assembler version of life, 
that ran under N* DOS (a pre-CP/M OS; dumping a hard-sectored 5-1/4 inch
floppy, and then decoding the pattern storage, was interesting).

The pattern evolves in a space (160 x 50 cells) larger than a 
traditional (80 x 24) terminal screen.  The display can be set to track 
the center or a corner of a pattern as it develops, or it can be set to 
show a fixed sub-region of the full pattern space.


To compile and test under SysV or BSD, run "make" after editing the 
appropriate Makefile.{sys5|bsd}. Curses is the default and is 
recommended.  If curses fails, try the termcap option:
	make -f Makefile.??? XOPT=-DTCAP 
The only somewhat non-standard system routine is getopt(3). 

A shell script, life.sh, is a wrapper for life with options for listing
input patterns and running lists of patterns.  For testing, the defaults for
life.sh are set for the directory structure created by unsharing.  Thus,
after compilation, for a demo running all pattern files:
	life.sh -m		#display list of pattern files
	life.sh -a -g25 	#run 25 cycles of each pattern

The pattern space is wrapped -- edge to opposite edge, corner to other
corners.  To watch the wrapping, compile with a space smaller than the
display screen, e.g., 10 x 20, and run a moving pattern, e.g., glider,
with a fixed display option, e.g., -c0:
	life1020 -c0 ./patterns/glider
A 10 x 20 compilation is included in the Makefile, as the target "life1020".  

Please send bug reports, comments, new favorite patterns, etc., to:

John Rupley
 uucp: ..{cmcl2 | hao!ncar!noao}!arizona!rupley!local
 internet: rupley!local@cs.arizona.edu
 (H) 30 Calle Belleza, Tucson AZ 85716 - (602) 325-4533
 (O) Dept. Biochemistry, Univ. Arizona, Tucson AZ 85721 - (602) 621-3929

