Skip to content
Game of Life, in Development
C++ Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
GosperGun.txt
README.md
file_importer.cpp
file_importer.h
game_rules.cpp
game_rules.h
grid.cpp
grid.h
main.cpp
makefile
test.txt

README.md

Game of Life

Students

Matt Raymond

2270559

raymo116@mail.chapman.edu

Christian Valencia

2275944

valen193@mail.chapman.edu

Instructions

  • Type make to compile the code.
  • Type ./mRaymond_cValencia.gol to execute program.
  • Choose whether you want to run the program from a pre-constructed map or a random map.
    • If you select a pre-constructed map, then please provide a file path.
    • If you select a random map, then please provide the following.
      • An integer for the X size of the map.
      • An integer for the Y size of the map.
      • A floating point number x such that 0 < x < 1.
  • Choose what mode you would like to play.
    • Classic is normal mode. The edges of the map act like cliffs, and anything off the map is dead.
    • Donut simulates the surface of a sphere, where something traveling off screen on the left will reappear on the right. It's the same for the top.
    • Mirror duplicated the contents of an edge onto the locations just outside of the map. For example, if the size of the map is l, then a cell on l-1 will be reflected onto l.
  • Choose a viewing mode.
    • Brief Pause will give a short pause before continuing on automatically.
      • If you choose Brief Pause, you'll be required to enter an integer for the size of the delay in milliseconds.
    • [Enter] will ask you to press the enter key between each Generation.
    • File Output will save to a file called mRaymond_cValencia.out.
  • Once started, the program will run through 1k generations unless it stabilizes first, at which point it will stop and ask you to press enter to exit the program.
    • The stability checks for two cases: no movement whatsoever, and repeating structures with a period of two generations.

References

Dynamic 2D Arrays

Throwing Exceptions

Casting to String

ANSI Escape Codes

Sleeping

Pausing

Error: free(): invalid next size (fast):

Check if File Exists

Makefile

You can’t perform that action at this time.