Screenshots
Life Source Code
 previous   up   next 

sl - The Seed7 version of the game of life

The original game of life was invented by mathematician John Conway. The idea is to initialize the screen with a pattern of bacteria in EDIT mode. The RUN mode or singlestep commands then bring life to the colony. The population increases and decreases according to fixed rules which affect the birth and death of individual bacterium. A rectangular grid (2-dimensional matrix) will be shown on the screen. Each cell in the grid can contain a bacterium or be empty. Each cell has 8 neighbors. The existence of cells from one generation to the next is determined by the following rules:

  1. A bacteria with 2 or 3 neighbors survives from one generation to the next. A bacterium with fewer neighbors dies of isolation. One with more neighbors dies of overcrowding.
  2. An empty cell spawns a bacteria if it has exactly three neighboring cells which contain bacteria.

In EDIT mode the following commands are available:

   Move the cursor
H J K L    Move the cursor
M *    Mark a cell
space    Erase a cell
enter    Calculate next generation
B    Back to previous generation
R    Enter the RUN mode
C    Clear the grid
D    Redraw the screen
G    Load (get) state from file
P    Save (put) state to file
I    Show info pages
Q    Quit the program
+    Scroll down
-    Scroll up
<    Scroll left
>    Scroll right
backspace    Erase cell left
tab    Forward 8 columns
shift-tab    Backward 8 columns
home    First column
end    Last column

In RUN mode the following commands are available:

any key    to enter the EDIT mode to create or change the pattern
Q    to Quit the game of LIFE

The EDIT and Quit commands take effect only at the end of a cycle.


Explosion of F pentomino

Glider canon

Clock

 previous   up   next