.TH LIFE 1
.SH LIFE
life \- Conway's simulation of life
.SH SYNOPSIS
.B life 
[
.B -g
number,
.B -o
output file,
.B -c 
number
]
[\ data\ file\ ]
.SH DESCRIPTION
Conway's  
.B Life
simulates population changes.
A starting population is established as a pattern of filled cells in
a matrix of cells,
which is changed according to rules that relate the next generation
to the current one.
.B Births 
-- an empty cell of the matrix is filled if the number of filled
surrounding cells is exactly three.
.B Survivals
-- a filled cell survives if the number of filled surrounding cells is
either two or three.
Filled cells with surroundings outside the limits ``die'' and become empty.
.PP
.in +3
``Note that the Universe is a toroid; 
i.e, the left extreme is adjacent to the
right extreme, the top is adjacent to the bottom, and each corner is
adjacent to each other corner. 
In other words, there ARE NO EXTREMES!!
Or, in a more physical illustration: 
if I could take a peek straight ahead
through the magical eyepiece of an infinitely powerful telescope, I'd be
able to see the back of my brain-damaged head....that is, of course,
assuming no galaxies or cats get in the way.''
.in +35
Leor Zolman
.in -38
.PP
A fairly large matrix is needed to hold developing patterns, 
so interesting ones are not destroyed by truncation or, in this program,
by wrapping.
Only a portion of the matrix (the default size is 50 x 160) can be
displayed on a 24 x 80 terminal screen.
Thus, the 
.B -c
options should be used to track a region of the evolving pattern, or to
fix on a selected region of the matrix.
.SS "COMMAND LINE OPTIONS"
.PP
.TP 5
\fB\-g number\fP		life ends after ``number'' generations
.TP 5
\fB\-o file\fP		copy pattern to ``file''
All of the pattern for each generation is copied to the file
specified by the option argument.
Blank regions outside the rectangle bounding the pattern are not copied.
.TP 5
\fB\-c number\fP		code for pattern display 
The portion of the pattern matrix displayed on a smaller screen is
specified by a control code (default 5 = track center of pattern):
.PP
.in +3
0	display fixed on center of input pattern.
.sp
1\-4	fixed at quadrant I\-IV of input pattern.
.sp
5	tracks center of evolving pattern.
.sp
6\-9	tracks quadrant I\-IV of evolving pattern.
.in +5
.sp
(quadrants numbered counterclockwise from upper right)
.in -8
.PP
Stdin is read if no input file is given on the command line.
.PP
.B Life 
may have been wrapped in a shell script, giving additional options, 
usage of which perhaps may be displayed by the option 
.B -z
or
.B -?.
.SH FILES
A set of pattern files is supplied for use as input to 
.B Life.
.SH AUTHOR
The simulation was invented by John Conway.
.sp
This version is based upon code written by Leor Zolman, 
``to exemplify PROPER use of 
.B goto 
statements in C programs!''
.sp
The original code dates to the early days of BDS C, the 8080, 
and before Apple had produced the glint in IBM's eye that lead to 
conception of the PC.
BDS C lacked some features of K&R C, but it was FAST in both 
compilation and execution.
BDS is an acronym for Brain Damaged Software.
.sp
Modifications for UNIX with curses, and a bit more, by:
.br
John Rupley
 uucp: ..{cmcl2 | hao!ncar!noao}!arizona!rupley!local
.br
 internet: rupley!local@cs.arizona.edu
.SH BUGS
Compared even to 8080 assembly versions, 
this generic UNIX version is slow, because it is output-bound.
.B Curses 
is somewhat better than line output under a
.B termcap
terminal specification.
.sp
The pattern display is one line and one column smaller than the terminal
screen.
The last line is used for status comments;
the last column is kept blank because of possible line-wrap problems.

