⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cpp

📁 数据结构与程序设计教材源码 数据结构与程序设计教材源码
💻 CPP
字号:
#include "../../C/UTILITY.H"
#include "LIFE.H"
 
#include "../../C/UTILITY.CPP"
#include "LIFE.CPP"
 
int main()  //  Program to play Conway's game of Life.
/* 
Pre: 
The user supplies an initial configuration of living cells.
Post:
The program prints a sequence of pictures showing the changes in
the configuration of living cells according to the rules for
the game of Life.
Uses:
The class Life and its methods initialize(),
print(), and update().

The functions  instructions(),  user_says_yes().
*/
{
   Life configuration;
   instructions();
   configuration.initialize();
   configuration.print();
   cout << "Continue viewing new generations? " << endl;
   while (user_says_yes()) {
      configuration.update();
      configuration.print();
      cout << "Continue viewing new generations? " << endl;
   }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -