Please Check the attached file.
There are two part requires
– Organize the sorrce
– Add feaeture
Must Window user, please.
Whenever the world is updated we must check to see which cells have been birthed, those cells’ position is
then updated in the stats object by adding 1 with the Stats-record function. Note that if the cell’s state has
not changed or if it has died, we do not record anything.
The Game’s option should be completed to display the current stats grid, this implies that we must call
the world and have the world call its stats object to display the statistics for the current iteration. The
program should then show “Press enter to continue.” prompt and wait for the user to respond
cin.ignore(10000,”\n”); does that nicely.
Submission:
This project has two parts:
1. Organize the code: separate the single provided source into the specified files.
2. Add a feature: create a class whose definition is provided to you, implement its member functions so
that it satisfies the constraints specified.
There might be many language details that are unfamiliar to you. That is completely fine, we will discuss
them in time, and you do not need to know anything about them to complete this project. In addition to
File Etiquette and Class Implementation, there are several aspects of programming that this project stresses.
Working with unfamiliar code and being able to get a general understanding of the overall flow of
execution. Using the IDE’s debugger can help in this regard using breakpoints.
Figuring out what is being specified, and for what aspect of the project the given information relates.
Read everything first and devise a plan, as you become more familiar with what you need to achieve
modify the plan accordingly.
Following what we discussed on multiple file etiquette take the single source file provided, and divide it into
appropriate header files and implementation files, one pair of files for each class. Place the main routine in
its own file named main.cpp. Make sure each file #includes the headers it needs. Each header file must
have include guards. Only include header files when definitions are actually needed; forward declare objects
in situations when the compiler only requires to “know” about the objects existence but not it’s definition.
Now what about the global constants? Place them in their own header file named globals.h. And what
about utility functions like delay or clearScreen? Place them in their own implementation file
named utils.cpp, and place their prototype declarations in globals.h.
The first thing you should do is make sure that the single source compiles as is. Play around with it to get
comfortable the program. The program implements Conway’s Game of Life
https://en.wikipedia.org/wiki/Conway%27s Game of Life, which is a simple simulation where cells are
either alive or dead based simple rules base Ion under population or overcrowding,
Complete this step first and make sure everything compiles and runs as expect prior to moving onto the
adding the feature.
Submit via canvas one zip file containing only the 15 source files produced for this project do not include
any IDE specific project files:
life.h blinker.h glider.h world.h
game.h stats.h globalsch
life.cpp blinker.cpp glider.cpp world.cpp game.cpp stats.cpp utils.cpp main.cpp
The zip file should be named