LIFE is a multicellular communal organism that inhabits the deserts of Flatland. The desert is organized in a square array with each square capable of holding one LIFE cell. LIFE generations mark the passage of time, each generation bringing births and deaths to the LIFE community.
To follow the history of such a community, place LIFE cells into their initial positions in the desert. Count the passing generations by observing these rules.
Write a program that simulates a LIFE community for a 10 x 10 colony. Enter the initial position of the community's cells (i.e., a table of 1's and 0's).
When computing the neighbors of a cell on the border, you cannot access all 9 neighbors. A solution to this problem is to maintain an outer border of 0s. Notice that rule 4 indicates that you cannot use any information from generation "I" to compute generation "I+1" but must only use information from generation "I-1". The easiest solution to this problem is the use of a temporary grid.