1. Homepage
  2. Programming
  3. Lab Week 1: Game of Life

Lab Week 1: Game of Life

Engage in a Conversation
C++Game of Life

Lab Week #1 Objectives • Use basic principles of object -oriented programming. • Get experience with C++ programming. Rules • Teamwork is allowed (make sure all team members understand the source code) . • Use your preferred IDE (Visual Studio , JetBrains Rider , Xcode, Code::Block , etc.) . • Using code from Internet is not allowed . • Comments y our files. Work • Implement the Game of Life in C++ with some constraints. • Game of life ’s rules o an infinite, two -dimensional orthogonal grid of square cells o each cell is in one of two possible states, live or dead o every cell interacts with its eight neighbours : CourseNana.COM

  1. Any live cell with fewer than two live neighbours dies .
  2. Any live cell with two or three live neighbours lives on to the next generation.
  3. Any live cell with more than three live neighbours dies on to the next generation .
  4. Any dead cell with exactly three live neighbours becomes a live cell on to the next generation . Steps
  5. First version a. The grid size can be set. b. The simulation runs until the user triggers a stop signal . c. Following function s required i. run(): performs one generation ii. display(): shows the c urrent states iii. init() : init the grid
  6. Second version (Can be your first steps if you feel comfortable ) a. Define class Automaton to model the simulation. b. Can pause and resume simulation.
  7. Third version a. Define class Cell i. Each c ell is in charge of computing its steps for the next generation. ii. Cell displays its state
  8. Fourth version a. Can save and load current generation in a file. b. Cells can detect some patterns and inform the user.
  9. Fifth version a. The user can change the state of a cell during runtime. b. The simulation can be reverted ( Revert to the previous state of a generation )
  10. Sixth version ++ a. Any update you would like to try. Thank you ! Resources • https://en.wikipedia.org/wiki/Conway's_Game_of_Lifehttps://playgameoflife.com/https://conwaylife.com/

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
C++代写,Game of Life代写,C++代编,Game of Life代编,C++代考,Game of Life代考,C++help,Game of Lifehelp,C++作业代写,Game of Life作业代写,C++编程代写,Game of Life编程代写,C++programming help,Game of Lifeprogramming help,C++assignment help,Game of Lifeassignment help,C++solution,Game of Lifesolution,