Question: Write in Java the Game of Life program by Conway. The program must be implemented under a single class. Represent a 20 x 20 grid.
Write in Java the Game of Life program by Conway.
The program must be implemented under a single class.
Represent a 20 x 20 grid.
When calculating the results of the rules:
o Squares off the edges of the board are assumed to be always empty
o All births and deaths happen simultaneously. In other words, the number of live neighbors for a given cell is always based on the cells before any rule was applied.
At the start :
The program will output 1) the current round # (round 1) and the initial layout of the board.
Then:
The program will wait for user input. Inputting n will calculate and display the next round board, along with the number of births and deaths.
i.e. look at picture.
And to terminate if any other input in inserted.
Births: 43 Deaths: 122 Round #2 0000 0000 00 000 o 00 000 0 0000 000 00 00 0 00 00000 00 00 0 0 00 0000 0 00 00 00 00 0000 000 00 0 00 00 0 0000 000 00 00 0 2-00 00000 000 0000 0 s-00 0000 000 h2 t# 000 000 ed 000 Dn 30 4R0 0 ---00 00 00 h_0 000 r-00 00 nB 00 0000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
