Question: Java - Must use stdDraw (follow all pre-instructions) TEST FILE: GameOfLife4.txt | Content of text file example: 5 5 0 0 0 0 0 0

Java - Must use stdDraw (follow all pre-instructions)

Java - Must use stdDraw (follow all pre-instructions) TEST FILE: GameOfLife4.txt |

Content of text file example: 5 5 0 0 0 0 0

0 0 1 0 0 0 0 1 0 0 0 0

1 0 0 0 0 0 0 0 Assignment John H. Conway,

TEST FILE: GameOfLife4.txt | Content of text file example:

5 5 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 

Assignment John H. Conway, a Cambridge mathematician, invented the Game of Life. The simulation runs on a two-dimensional arrav. Each cell in the arrav is in one of two states: occupied by a creature or empty. In this assignment we will populate the initial grid by reading data from a text file Once the initial grid has been created, the program loops. Each iteration of the loop represents a tick or time step (in other words, a new generation) in the environment. Cells interact with their eight neighbors. Neighbors are the cells that are horizontally, vertically, or diagonally adjacent. Creatures are created and die based on the following rules: 1. Any living creature (occupied cell) with fewer than two live neighbors dies of 2. Any living creature with two or three live neighbors lives on to the next 3. Any living creature with more than three live neighbors dies of 4. Any empty cell with exactly three live neighbors becomes an occupied cell. loneliness. generation. overcrowding This represents a birth. It is important to note that all births and deaths in each tick occur simultaneously

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!