Question: I dont really get this or how to start it so can i have a code for this project. Its game of life but in

I dont really get this or how to start it so can i have a code for this project. Its game of life but in C++ language.

The code should read an integer (let's call it n) from the command line and Apply the Game of Life rules n times to the grid and print the result. For instance, if someone runs n = 7, it should advance the grid 7 times, and print out the final result once. use (period) for dead and O for alive.

Rules:

  1. Any live cell with fewer than two live neighbors dies, as if caused by under population.
  2. Any live cell with two or three live neighbors lives on to the next generation.
  3. Any live cell with more than three live neighbors dies, as if by overpopulation.
  4. Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction

I dont really get this or how to start it so cani have a code for this project. Its game of life but

In this project, you are going to implement Conway's Game of Life. There are quite some interesting things to say about the Game of Life, but for our purposes, we just care that it makes pretty pictures. What you'll learn from doing this: More about the class. Reading and writing files. Command line arguments and getopt_long. Functions and arguments. A bit more about the unix shell. . Important Notes on Grading As always, Code that does not compile will receive a 0. Files that are not properly named will receive a 0. (See the section below on "what to submit.) 1#include 4 using std::cout; 5 6 vector vector bool> > world = { 70,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 8 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 9 {0,0,0,0,0, ,0,0,0,0,0,0,0,0,0,0) 10 {0,0,0, 0,0,0,0,0,0,0,0,0}, 11 {@,,, 0,0,0,0,0,0,0,0,0,0 12 {@,, B. 0,0,0,0,0,0,0,0}, 13 {@,0,0, 0,0,0,1,0,0,0,0 0 14 {C,0,0,0, 0,0,0,0,1,0,0,0,0}, 15 {@,,,, ,0,0,1,1,1,0,0,0,0}, 16 {0,0,0,0, 0,0,0,0,0,0,0,0,0} 0.0.0 2 17}; 20 { 18 19 int main(int arge, char *argv[]) 21 vector> future (world); /* make future a copy of world. */ 22 /* NOTE: the vector 'world' above corresponds to the contents 23 * of ../res/tests/0. TODO: apply the rules to the vector, 24 * write the result to standard output, and compare with the 25 contents of ../tests/1, */ world = future; return; 29

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!