Write a program to simulate life. The world is a rectangular grid of cells, each of which may contain an organism. Each cell has eight neighbors, like so: 1 2 3 4 * 5 (the numbers are for illustration purposes only) 6 7 8 The world is initially created by the user with some organisms at various cells. The user specifies the cells that are initially "alive". Then successive generations are obtained by two rules: 1) an organism in a cell survives to the next generation if exactly 2 or 3 of its neighbors are living, otherwise it dies 2) an organism is born into an unoccupied cell if exactly 3 of its neighbors are occupied. Display the generations under user command until the user grows weary of this world. Method: The world will be represented by a 2-dimensional array (which may not be a global variable). 20 by 20 is a good enough size. Each element of the array will represent a cell that has a living organism in it or is dead. A new generation is generated by examining each cell and creating its next state (living or dead) simultaneously with all the other cells, thus the next generation must be created into a copy of the world. To simplify the code, the "perimeter" of the world can always be dead cells. You must have some functions, say one to get the user's coordinates, one to display the "world", one to count the number of living neighbors of a cell, and one to generate the next generation. Example: User specifies some valid coordinates for organisms to be created in, then (only a portion of the "world" is displayed here, to save space. The line is in the same place in the world): _____________ * * * * Created world configuration. *** ____________ this blank line below the line is significant. ** ** * * Next generation * _____________ ** ** Next generation ** ** * _____________ ** ** Next generation * * *** _____________ ** ** Next generation * * *** * ______________ ** ** * * Next generation *** ***
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows? (depending on the nature? of the deliverables):
a)? For web sites or? other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software? installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
needs to be in c++ only the code is needed