StdID | Name |
---|---|
64156 | Hassan Zaheer |
64160 | Shahmeer khan |
First i learn the rules of the game then i googled some source code and found 1 of c# from geeksforgeeks but that was method based and hardcoded. so i eventually converted the syntax in c and run it after that i loaded array from file by using FILE and its functions.. then i made single threadfunction and put the nextgeneration code in it. the output was saved in a file and every generation output was appended in file. finally i calculated the time by using <time.h> library and saved that too in the file at the end.
Got the idea from GeaksforGeeks.
Made many variables gloabl so that they dosent required to be passed and passed the Needed one only.
working late at night :)
- Basic code of game: https://www.geeksforgeeks.org/program-for-conways-game-of-life/
- How to load 2d array from a file: https://www.reddit.com/r/C_Programming/comments/2nt9n4/reading_from_txt_file_into_2d_array_help_needed/
- Many other website for sytax checking and eleminating errors.