life(6) life(6)
NAME
life - play the game of life
SYNOPSIS
life [-r]
DESCRIPTION
life is a pattern generating game set up for interactive use
on a video terminal. The way it operates is: You use a
series of commands to set up a pattern on the screen then
let it generate further patterns from that pattern.
The algorithm used is: For each square in the matrix, look
at it and its eight adjacent neighbors. If the present
square is not occupied and exactly three of its neighbor
squares are occupied, then that square will be occupied in
the next pattern. If the present square is occupied and two
or three of its neighbor squares are occupied, then that
square will be occupied in the next pattern. Otherwise, the
present square will not be occupied in the next pattern.
The edges of the screen are normally treated as an
unoccupied void. If you specify the -r option on the
command line, the screen is treated as a sphere; that is,
the top and bottom lines are considered adjacent and the
left and right columns are considered adjacent.
The pattern generation number and the number of occupied
squares are displayed in the lower left hand corner.
Below is a list of commands available to the user. A #
stands for any number. A ^ followed by a capital letter
represents a control character.
#,#a Add a block of elements. The first number
specifies the horizontal width. The second number
specifies the vertical width. If a number is not
specified, the default is 1.
#c Step through the next # patterns. If no number is
specified, step forever. The operation can be
aborted by typing rubout (delete).
#,#d Delete a block of elements. The first number
specifies the horizontal width. The second number
specifies the vertical width. If a number is not
specified, the default is 1.
#f Generate a little flier at the present location.
The number (modulo 8) determines the direction.
#,#g Move to absolute screen location. The first
Page 1 (last mod. 1/14/87)
life(6) life(6)
number specifies the horizontal location. The
second number specifies the vertical location. If
a number is not specified, the default is 0.
#h Move left # steps. If no number is specified, the
default is 1.
#j Move down # steps. The default is 1.
#k Move up # steps. The default is 1.
#l Move right # steps. The default is 1.
#n Step through the next # patterns. If no number is
specified, generate the next pattern. The
operation can be aborted by typing rubout
(delete).
p Put the last yanked or deleted block at the
present location.
q Quit.
#,#y Yank a block of elements. The first number
specifies the horizontal width. The second number
specifies the vertical width. If a number is not
specified, the default is 1.
C Clear the pattern.
#F Generate a big flier at the present location. The
number (modulo 8) determines the direction.
#H Move to the left margin.
#J Move to the bottom margin.
#K Move to the top margin.
#L Move to the right margin.
#^H Move left # steps. If no number is specified, the
default is 1.
#^J Move down # steps. The default is 1.
#^K Move up # steps. The default is 1.
#^L Move right # steps. The default is 1.
^R Redraw the screen. This is used for those
occasions when the terminal screws up.
Page 2 (last mod. 1/14/87)
life(6) life(6)
. Repeat the last add (a) or delete (d) operation.
; Repeat the last move (h, j, k, l) operation.
BUGS
The following features are planned but not implemented:
#,#S Save the selected area in a file.
R Restore from a file.
m Generate a macro command.
! Shell escape.
e Edit a file.
i Input commands from a file.
FILES
/usr/games/life
Page 3 (last mod. 1/14/87)