import java.util.Scanner;
public class Life {
static Scanner input = new Scanner(System.in);
public static void main(String[] args){
String [][]world;
world = new String [20][20];
String alivecell = "A";
String deadcell = "D";
int day = 0;
for (int a = 0; a<20; a++){
for (int a2 = 0; a2<20; a2++){
world [a][a2] = deadcell;
//shows every cell as dead
}
}
int more = 1;
// meant for if the player is wanting to add more living cells onto the game
while (more ==1){
int c = 21;// column
int r = 21;// row
while(c > 20||r > 20){// since the game is in a 20x20 grid, it will loop the
code below if the column or row is above 20
System.out.println("Which column do you want a cell to be on?;
c = input.nextInt();
System.out.println("Which row do you want a cell to be on? ");
r=input.nextInt();
c=c-1;
r=r-1;
}
day = 1;/// a day of living cell(s) has begun
System.out.println("day " + day);
for(int a=0; a<20; a++ ){
for(int a2=0; a2<20; a2++ ){
world[c][r] = alivecell;// WHICH CELLS SHOULD BE ALIVE
System.out.format("%3s", world [a][a2] );//output shown in 20x20
grid
}
System.out.println();
}
System.out.println("add more living cells (type 1) or start game (press
any other button)?");
more = input.nextInt();
if (more !=1){
game(world, deadcell, deadcell, c, r, 0);
}
}
}
public static void game(String [][] world, String alivecell, String deadcell, int c, int r, int day){
// cells alive on prev day
// if the number of neighbors were 2 or 3
// neighbors in corners and sides (c/column =0 or r/row =0)
// neighbors in any other area
int cont = 1;
day = 1;
while (cont ==1){
System.out.println("Day " +(day+1));
day = day +1;
for(int a=0; a<20; a++ ){
for(int a2=0; a2<20; a2++ ){
if(world[(a)][a2] == alivecell || world[(a)][a2] == alivecell ){
if (world [c][r-1] == alivecell && world[c][r+1] ==alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world [c+1][r] == alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world[c+1][r] ==alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world [c+1][r-1] == alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world[c+1][r+1] ==alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world [c+1][r+1] == alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world[c+1][r-1] ==alivecell ||
//2 cells on a row and one more neighbor near in some form
world [c+1][r] == alivecell && world[c][r-1] == alivecell||
world [c+1][r] == alivecell && world[c][r+1] == alivecell||
world [c+1][r] == alivecell && world[c-1][r+1] == alivecell||
world [c+1][r] == alivecell && world[c-1][r-1] == alivecell||
world [c][r-1] == alivecell && world[c][r-1] == alivecell||
world [c][r+1] == alivecell && world[c][r+1] == alivecell||
world [c][r+1] == alivecell && world[c][r-1] == alivecell||
world [c][r-1] == alivecell && world[c][r+1] == alivecell||
world [c][r+1] == alivecell && world[c+1][r+1] == alivecell||
world [c][r-1] == alivecell && world[c+1][r-1] == alivecell||
world [c][r-1] == alivecell && world[c+1][r+1] == alivecell||
world [c][r+1] == alivecell && world[c+1][r-1] == alivecell||
world [c][r-1] == alivecell && world[c+1][r-1] == alivecell||
world [c+1][r-1] == alivecell && world[c+1][r] ==alivecell && world [c+1][r+1] == alivecell||
world [c+1][r-1] == alivecell && world[c][r-1] ==alivecell && world [c+1][r+1] == alivecell||
world [c+1][r-1] == alivecell && world[c][r+1] ==alivecell && world [c+1][r+1] == alivecell
){
world[a][a2]=alivecell;
}else{
world[a][a2]=deadcell;
}
}
if(world[a][(0)] == alivecell|| world[a][(20)] == alivecell){
if(world [c+1][r] == alivecell && world[c-1][r] ==alivecell ||
world [c+1][r] == alivecell && world[c-1][r] ==alivecell && world [c][r+1] == alivecell ||
world [c+1][r] == alivecell && world[c-1][r] ==alivecell && world [c-1][r+1] == alivecell ||
world [c+1][r] == alivecell && world[c-1][r] ==alivecell && world [c+1][r+1] == alivecell ||
world [c-1][r+1] == alivecell && world[c][r+1] ==alivecell && world [c-1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c+1][r] ==alivecell && world [c-1][r-1] == alivecell||
world [c+1][r-1] == alivecell && world[c+1][r] ==alivecell && world [c+1][r+1] == alivecell||
world [c+1][r-1] == alivecell && world[c-1][r] ==alivecell && world [c+1][r+1] == alivecell||
world [c+1][r-1] == alivecell && world[c][r-1] ==alivecell && world [c+1][r+1] == alivecell||
world [c+1][r-1] == alivecell && world[c][r+1] ==alivecell && world [c+1][r+1] == alivecell||
world [c-1][r+1] == alivecell && world[c+1][r] ==alivecell && world [c-1][r-1] == alivecell||
world [c-1][r+1] == alivecell && world[c-1][r] ==alivecell && world [c-1][r-1] == alivecell||
world [c-1][r] == alivecell && world[c][r+1] == alivecell||
world [c+1][r] == alivecell && world[c][r+1] == alivecell||
world [c-1][r] == alivecell && world[c+1][r+1] == alivecell||
world [c+1][r] == alivecell && world[c+1][r+1] == alivecell||
world [c-1][r] == alivecell && world[c-1][r+1] == alivecell||
world [c+1][r] == alivecell && world[c-1][r+1] == alivecell)
{
world[a][a2] = alivecell;
}else{
world[a][a2] = deadcell;
}
}
if(world[0][0] == alivecell){
if(world[(0+1)][(0+1)] == alivecell && world[(0+1)][0]==alivecell&&world[0][(0+1)] == alivecell ||
world[(0+1)][(0+1)] == alivecell && world[(0+1)][0]==alivecell||
world[(0+1)][(0+1)]==alivecell && world[0][(0+1)]==alivecell||
world[(0+1)][(0)] == alivecell && world[0][(0+1)] == alivecell
){
world [c][r] = alivecell;
} else {
world [c][r] = deadcell;
}
}else if(world[0][0] ==deadcell){
if(
world[(0+1)][(0+1)] == alivecell && world[(0+1)][0]==alivecell||
world[(0+1)][(0+1)]==alivecell && world[0][(0+1)]==alivecell||
world[(0+1)][(0)] == alivecell && world[0][(0+1)] == alivecell
){
world [c][r] = alivecell;
}else {
world [c][r] = deadcell;
}
if (world[0][19] == alivecell){
if(world[(0+1)][19] == alivecell && world[0][19-1]==alivecell&&world[0+1][19-1] == alivecell ||
world[(0+1)][(19-1)] == alivecell && world[0][(19-1)]==alivecell||
world[(0+1)][19]==alivecell && world[(0+1)][(19-1)]==alivecell||
world[(0+1)][19] == alivecell && world[0][(19-1)] == alivecell
){
world [c][r] = alivecell;
}else {
world [c][r] = deadcell;
}
}else if (world[0][19] == deadcell){
if(world[(0+1)][(19-1)] == alivecell && world[0][(19-1)]==alivecell||
world[(0+1)][(19)]==alivecell && world[(0+1)][(19-1)]==alivecell||
world[(0+1)][19] == alivecell && world[0][(19-1)] == alivecell
){
world [c][r] = alivecell;
}else {
world [c][r] = deadcell;
}
}
if (world[19][19] == alivecell){
if(world[19-1][19-1] == alivecell && world[19-1][19]==alivecell&&world[19][19-1] == alivecell ||
world[19-1][19-1] == alivecell && world[19-1][19]==alivecell||
world[19-1][19]==alivecell && world[19][19-1]==alivecell||
world[19-1][19-1] == alivecell && world[19-1][19] == alivecell
){
world [c][r] = alivecell;
}else {
world [c][r] = deadcell;
}
}else if (world[19][19] == deadcell){
if(
world[19-1][19-1] == alivecell && world[19-1][19]==alivecell||
world[19-1][19]==alivecell && world[19][19-1]==alivecell||
world[19-1][19-1] == alivecell && world[19-1][19] == alivecell
){
world [c][r] = alivecell;
} else {
world [c][r] = deadcell;
}
if(world[19][0] == alivecell){
if(world[(19-1)][0+1] == alivecell && world[(19+1)][0]==alivecell&&world[19][0+1] == alivecell ||
world[(19+1)][0+1] == alivecell && world[(19-1)][0]==alivecell||
world[(19-1)][0]==alivecell && world[19][0+1]==alivecell||
world[(19-1)][0+1] == alivecell && world[19][0+1] == alivecell
){
world [c][r] = alivecell;
} else {
world [c][r] = deadcell;
}
}else if(world[19][0] == alivecell){
if(world[(19-1)][0+1] == alivecell && world[(19+1)][0]==alivecell&&world[19][0+1] == alivecell ||
world[(19+1)][0+1] == alivecell && world[(19-1)][0]==alivecell||
world[(19-1)][0]==alivecell && world[19][0+1]==alivecell||
world[(19-1)][0+1] == alivecell && world[19][0+1] == alivecell
){
world [c][r] = alivecell;
} else {
world [c][r] = deadcell;
}
}
if (world [a][a2]== alivecell){
if (world [c][r-1] == alivecell && world[c][r+1] ==alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world [c-1][r] == alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world[c+1][r] ==alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world [c-1][r-1] == alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world[c+1][r+1] ==alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world [c-1][r+1] == alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world[c+1][r-1] ==alivecell ||
//2 cells on a row and one more neighbor near in some form
world [c-1][r] == alivecell && world[c+1][r] ==alivecell ||
world [c-1][r] == alivecell && world[c+1][r] ==alivecell && world [c][r+1] == alivecell ||
world [c-1][r] == alivecell && world[c+1][r] ==alivecell && world [c][r-1] == alivecell ||
world [c-1][r] == alivecell && world[c+1][r] ==alivecell && world [c+1][r+1] == alivecell ||
world [c-1][r] == alivecell && world[c+1][r] ==alivecell && world [c-1][r+1] == alivecell ||
world [c-1][r] == alivecell && world[c+1][r] ==alivecell && world [c+1][r-1] == alivecell ||
world [c-1][r] == alivecell && world[c+1][r] ==alivecell && world [c-1][r-1] == alivecell ||
// 2 cells on a column and one more neighbor near in some form
world [c+1][r-1] == alivecell && world[c-1][r+1] == alivecell||
world [c+1][r-1] == alivecell && world[c-1][r+1] ==alivecell && world [c-1][r-1] == alivecell ||
world [c+1][r-1] == alivecell && world[c-1][r+1] ==alivecell && world [c+1][r+1] == alivecell ||
world [c+1][r-1] == alivecell && world[c-1][r+1] ==alivecell && world [c+1][r] == alivecell ||
world [c+1][r-1] == alivecell && world[c-1][r+1] ==alivecell && world [c][r+1] == alivecell ||
world [c+1][r-1] == alivecell && world[c-1][r+1] ==alivecell && world [c-1][r] == alivecell ||
world [c+1][r-1] == alivecell && world[c-1][r+1] ==alivecell && world [c][r-1] == alivecell ||
world [c+1][r+1] == alivecell && world[c-1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c-1][r-1] ==alivecell && world [c+1][r] == alivecell ||
world [c+1][r+1] == alivecell && world[c-1][r-1] ==alivecell && world [c][r+1] == alivecell ||
world [c+1][r+1] == alivecell && world[c-1][r-1] ==alivecell && world [c][r-1] == alivecell ||
world [c+1][r+1] == alivecell && world[c-1][r-1] ==alivecell && world [c-1][r+1] == alivecell ||
world [c+1][r+1] == alivecell && world[c-1][r-1] ==alivecell && world [c-1][r] == alivecell ||
world [c+1][r+1] == alivecell && world[c-1][r-1] ==alivecell && world [c+1][r-1] == alivecell||
// 2 cells shown diagonally and one more neighbor near in some form
world [c-1][r] == alivecell && world[c][r-1] == alivecell||//
world [c+1][r] == alivecell && world[c][r+1] == alivecell||
world [c+1][r] == alivecell && world[c][r-1] == alivecell||//
world [c-1][r] == alivecell && world[c][r+1] == alivecell||
world [c+1][r] == alivecell && world[c+1][r-1] == alivecell||//
world [c+1][r] == alivecell && world[c-1][r+1] == alivecell||
world [c-1][r] == alivecell && world[c-1][r-1] == alivecell||//
world [c-1][r] == alivecell && world[c-1][r+1] == alivecell||
world [c+1][r] == alivecell && world[c-1][r-1] == alivecell||//
world [c+1][r] == alivecell && world[c+1][r+1] == alivecell||
world [c-1][r] == alivecell && world[c-1][r-1] == alivecell||//
world [c-1][r] == alivecell && world[c+1][r+1] == alivecell||
world [c][r-1] == alivecell && world[c][r-1] == alivecell||
world [c][r+1] == alivecell && world[c][r+1] == alivecell||
world [c][r+1] == alivecell && world[c][r-1] == alivecell||
world [c][r-1] == alivecell && world[c][r+1] == alivecell||
world [c][r+1] == alivecell && world[c+1][r-1] == alivecell||
world [c][r+1] == alivecell && world[c-1][r+1] == alivecell||
world [c][r-1] == alivecell && world[c-1][r-1] == alivecell||
world [c][r-1] == alivecell && world[c-1][r+1] == alivecell||
world [c][r+1] == alivecell && world[c-1][r-1] == alivecell||
world [c][r+1] == alivecell && world[c+1][r+1] == alivecell||
world [c][r-1] == alivecell && world[c-1][r-1] == alivecell||
world [c][r-1] == alivecell && world[c+1][r+1] == alivecell||
world [c+1][r+1] == alivecell && world[c][r-1] ==alivecell && world [c+1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c][r+1] ==alivecell && world [c+1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c-1][r] ==alivecell && world [c+1][r-1] == alivecell||
world [c-1][r-1] == alivecell && world[c-1][r] ==alivecell && world [c-1][r+1] == alivecell||
world [c-1][r-1] == alivecell && world[c+1][r] ==alivecell && world [c-1][r+1] == alivecell||
world [c-1][r-1] == alivecell && world[c][r-1] ==alivecell && world [c-1][r+1] == alivecell||
world [c-1][r-1] == alivecell && world[c][r+1] ==alivecell && world [c-1][r+1] == alivecell||
world [c-1][r-1] == alivecell && world[c-1][r] ==alivecell && world [c+1][r-1] == alivecell||
world [c-1][r-1] == alivecell && world[c+1][r] ==alivecell && world [c+1][r-1] == alivecell||
world [c-1][r-1] == alivecell && world[c][r-1] ==alivecell && world [c+1][r-1] == alivecell||
world [c-1][r-1] == alivecell && world[c][r+1] ==alivecell && world [c+1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c-1][r] ==alivecell && world [c+1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c+1][r] ==alivecell && world [c+1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c][r-1] ==alivecell && world [c+1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c][r+1] ==alivecell && world [c+1][r-1] == alivecell
// mix
)
{
world [c][r] = alivecell;
} else {
world [c][r] = deadcell;
}
}else if (world [a][a2]== deadcell){
if (
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world [c-1][r] == alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world[c+1][r] ==alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world [c-1][r-1] == alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world[c+1][r+1] ==alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world [c-1][r+1] == alivecell ||
world [c][r-1] == alivecell && world[c][r+1] ==alivecell && world[c+1][r-1] ==alivecell ||
//2 cells on a row and one more neighbor near in some form
world [c-1][r] == alivecell && world[c+1][r] ==alivecell && world [c][r+1] == alivecell ||
world [c-1][r] == alivecell && world[c+1][r] ==alivecell && world [c][r-1] == alivecell ||
world [c-1][r] == alivecell && world[c+1][r] ==alivecell && world [c+1][r+1] == alivecell ||
world [c-1][r] == alivecell && world[c+1][r] ==alivecell && world [c-1][r+1] == alivecell ||
world [c-1][r] == alivecell && world[c+1][r] ==alivecell && world [c+1][r-1] == alivecell ||
world [c-1][r] == alivecell && world[c+1][r] ==alivecell && world [c-1][r-1] == alivecell ||
// 2 cells on a column and one more neighbor near in some form
world [c+1][r-1] == alivecell && world[c-1][r+1] ==alivecell && world [c-1][r-1] == alivecell ||
world [c+1][r-1] == alivecell && world[c-1][r+1] ==alivecell && world [c+1][r+1] == alivecell ||
world [c+1][r-1] == alivecell && world[c-1][r+1] ==alivecell && world [c+1][r] == alivecell ||
world [c+1][r-1] == alivecell && world[c-1][r+1] ==alivecell && world [c][r+1] == alivecell ||
world [c+1][r-1] == alivecell && world[c-1][r+1] ==alivecell && world [c-1][r] == alivecell ||
world [c+1][r-1] == alivecell && world[c-1][r+1] ==alivecell && world [c][r-1] == alivecell ||
world [c+1][r+1] == alivecell && world[c-1][r-1] ==alivecell && world [c+1][r] == alivecell ||
world [c+1][r+1] == alivecell && world[c-1][r-1] ==alivecell && world [c][r+1] == alivecell ||
world [c+1][r+1] == alivecell && world[c-1][r-1] ==alivecell && world [c][r-1] == alivecell ||
world [c+1][r+1] == alivecell && world[c-1][r-1] ==alivecell && world [c-1][r+1] == alivecell ||
world [c+1][r+1] == alivecell && world[c-1][r-1] ==alivecell && world [c-1][r] == alivecell ||
world [c+1][r+1] == alivecell && world[c-1][r-1] ==alivecell && world [c+1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c-1][r] ==alivecell && world [c+1][r-1] == alivecell||
// 2 cells shown diagonally and one more neighbor near in some form
world [c+1][r+1] == alivecell && world[c][r-1] ==alivecell && world [c+1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c][r+1] ==alivecell && world [c+1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c-1][r] ==alivecell && world [c+1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c-1][r] ==alivecell && world [c+1][r-1] == alivecell||
world [c-1][r-1] == alivecell && world[c-1][r] ==alivecell && world [c-1][r+1] == alivecell||
world [c-1][r-1] == alivecell && world[c+1][r] ==alivecell && world [c-1][r+1] == alivecell||
world [c-1][r-1] == alivecell && world[c][r-1] ==alivecell && world [c-1][r+1] == alivecell||
world [c-1][r-1] == alivecell && world[c][r+1] ==alivecell && world [c-1][r+1] == alivecell||
world [c-1][r-1] == alivecell && world[c-1][r] ==alivecell && world [c+1][r-1] == alivecell||
world [c-1][r-1] == alivecell && world[c+1][r] ==alivecell && world [c+1][r-1] == alivecell||
world [c-1][r-1] == alivecell && world[c][r-1] ==alivecell && world [c+1][r-1] == alivecell||
world [c-1][r-1] == alivecell && world[c][r+1] ==alivecell && world [c+1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c-1][r] ==alivecell && world [c+1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c+1][r] ==alivecell && world [c+1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c][r-1] ==alivecell && world [c+1][r-1] == alivecell||
world [c+1][r+1] == alivecell && world[c][r+1] ==alivecell && world [c+1][r-1] == alivecell
// mix
)
{
world [c][r] = alivecell;
}else{
world [c][r] = deadcell;
}
}
}
}
System.out.format("%3s",world [a][a2]);
}
System.out.println();
}
System.out.println("continue / start next day, y(1) or n(2)?");
cont = input.nextInt();
}
switch (cont){
case 2:
System.out.println("end");
break;
}
//end
}
}
OUTPUT
Which column do you want a cell to be on? (starts at 0)
2
Which row do you want a cell to be on?
2
day 1
D D D D D D D D D D D D D D D D D D D D
D A D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
add more living cells (type 1) or start game (press any other button)?
1
Which column do you want a cell to be on? (starts at 0)
2
Which row do you want a cell to be on?
3
day 1
D D D D D D D D D D D D D D D D D D D D
D A A D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
add more living cells (type 1) or start game (press any other button)?
1
Which column do you want a cell to be on? (starts at 0)
2
Which row do you want a cell to be on?
4
day 1
D D D D D D D D D D D D D D D D D D D D
D A A A D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
add more living cells (type 1) or start game (press any other button)?
2
Day 2
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
D D D D D D D D D D D D D D D D D D D D
if the cells were near each other in this way, the "day 2 " out put should've been
D D A D D D D D D D D D D D D D D D D D
D D A D D D D D D D D D D D D D D D D D
D D A D D D D D D D D D D D D D D D D D
Aucun commentaire:
Enregistrer un commentaire