void showGrid(const char grid[ROWS][COLUMNS]);
bool load(string file, char grid[ROWS][COLUMNS]);
void evolve(char grid[ROWS][COLUMNS]);
int countNeighbors(char neighborGrid[ROWS][COLUMNS], char grid[ROWS][COLUMNS]);
int computeAdjustment(int row, int column, char grid[ROWS][COLUMNS]);
int countNeighbors(int row,int column , char grid[ROWS][COLUMNS]);
int main()
{
char malarky[20][40];
int menu = 0;
while (menu < 2)
{
int option;
int iteration = 0;
string file;
cout << "--------------------------------------------------------------" << endl;
cout << "Welcome to the Game of Life simulation" << endl;
cout << "Iteration: " << iteration << endl;
cout << "1 - Load file" << endl;
cout << "2 - Evolve" << endl;
cout << "0 - Exit" << endl;
cout << " " << endl;
cout << "Enter option: ";
cin >> option;
switch(option)
{
case 1:
cout << "What is the name of the file you would like to access?" << endl;
cin >> file;
cout << "--------------------------------------------------------------" << endl;
bool loaded = load(file, malarky);
if (loaded == true)
{
showGrid(malarky);
}
else
{
cout << "File was not loaded." << endl;
cout << " " << endl;
}
break;
case 2:
break;
}
}
}
void showGrid(const char grid[ROWS][COLUMNS])
{
int display1, display2;
for (display1 = 0; display1 < ROWS; display1++)
{
for (display2 = 0; display2 < COLUMNS; display2++)
{