Question: You are going to be implementing the classic computer science simulation, Conway's Game of Life Conway's Life is played on a matrix of cells, kind






You are going to be implementing the classic computer science simulation, Conway's Game of Life Conway's Life is played on a matrix of cells, kind of like a chess board but theoretically extending infinitely in every direction. Each individual cell in the matrix can either be alive or dead. Alive cell in the matrix is shown in our simulation by printing an asterisk to the screen. A dead cell is shown by leaving that area of the matrix in the display empty Each cell has a "neighborhood" consisting of the eight cells in every direction around it, including diagonals. Cells on the edges of the matrix may not have eight "true" neighbors, but we will assume that their neighbors that would be off the matrix are considered to always be dead cells From generation to generation, whether or not a cell survives or has life bom into it depends on how many neighbors it has. Some examples follow Please note that these eight examples are not the only possible scenarios that your program might encounter. In each of these examples, we are focusing on what happens to the middle cel in these examples from one generation to the next A dead middle cell with exactly three live neighbors becomes a live cell in the next generation (birth) The middle cell would become live in the The middle cell would become live in the next generation because it has exactly 3 next generation because it has exactly 3 live neighbors live neighbors Alive middle cell with two or three live neighbors stays alive in the next generation (survival): The middle cell would survive to the next The middle cell would survive because it generation because it has two live has three live neighbors neighbors In all other cases, the middle cell dies or remains dead (overcrowding or loneliness) The middle cell would die in the next The middle cell would die in the next generation because it has only one live generation because it has four live neighbor (loneliness neighbors (overcrowding)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
