the game of life

时间:2016-12-21 15:04:16
【文件属性】:

文件名称:the game of life

文件大小:4KB

文件格式:C

更新时间:2016-12-21 15:04:16

life game in c

The Game of Life 1. Survival An inhabited cell remains inhabited if exactly 2 or 3 of its neighbouring cells are inhabited. 2. Death An inhabited cell becomes uninhabited if fewer than 2, or bours are inhabited. 3. Birth An uninhabited cell becomes inhabited if exactly 3 of its neighbours are inhabited. In my version, a 2D array of chars is used. INHABITED means cell is on, EMPTY means cell is off. The game plays 100 rounds, printing to the screen each time. '#' printedl.


网友评论

  • 挺好的 很实用