/GameOfLife-simulation

John Conway's Game Of Life simulation using Pygame and NumPy.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

GameOfLife simulation #MiniProject-1

Description

Game of life simulation model using Pygame and Numpy. The project is modulated under two files including the code for initializing the pygame environment and screen diamensions in GameOfLife.py and the logic code developed using OOPS with functions for getting the adjacent neighbours, colors and creating the n-dimensional array in Grid.py.

Dependencies

  • Sublime text Editor v3.2.2 Build 3211

  • Terminal MacOS Catalina v10.15.1

  • Python Libraries

    • pygame
    • numpy
    • random
    • os

Code Execution:

The code executes in 3 steps:

  • Initializing pygame environment with init and assigning screen resolution, colors, frames rates per second elapsed, scaler variable and a loop for running the events in pygame.
  • Inilializing the Grid class to hold the required logic functions
  • Functions for creating a 2d array, calculating the number of adjacent neighbours to the current cell, computing cell state for the next generation and finally assigning colors to the dead and live cells.

Authors

contributors name and contact info ex.@priyansh0312

Version History

License

GNU General Public License v3.0

Reference

48ub98