Question
Write in BASIC Java the Game of Life program by Conway. (I am not an advanced programmer so keeping it basic will help me understand
Write in BASIC Java the Game of Life program by Conway. (I am not an advanced programmer so keeping it basic will help me understand the program better.)
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 program 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 0000Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started