Skip to content

This repository contains a Python implementation of Conway's Game of Life using the Pygame library for visualization and user interaction.

License

Notifications You must be signed in to change notification settings

JimmyVS/Game-Of-Life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conway's Game of Life with Pygame

License: MIT Python: 3.8+ Pygame: 2.0.0+

Window

Introduction

This repository contains a Python implementation of Conway's Game of Life using the Pygame library for visualization and user interaction. Conway's Game of Life is a cellular automaton devised by mathematician John Conway, where the state of each cell evolves over time based on simple rules.

Getting Started

To run the simulation, follow these steps:

  • Make sure you have Python installed on your system.
  • Install the Pygame library using the following command: pip install pygame

Clone this repository to your local machine: git clone https://github.com/JimmyVS/Game-Of-Life.git

Navigate to the project directory: cd Game-Of-Life

Run the game_of_life.py script: python Game_Of_Life.py

Controls

Keys/Clicks Actions
Left Click Place cells
Right Click Place a "glider" pattern
Space Play/Pause the simulation
Escape or close window Quit the simulation

Rules

The rules of Conway's Game of Life are applied to update the grid:

  1. A living cell with fewer than 2 or more than 3 living neighbors dies.
  2. A dead cell with exactly 3 living neighbors becomes alive.
  3. Otherwise, cells maintain their current state.

Contributing

If you'd like to contribute to the project, feel free to open an issue, suggest enhancements, or submit pull requests.

License

This project is licensed under the MIT License. Made by Jim Grysmpolakis. Please do not claim as yours.

Have fun exploring the fascinating patterns and behaviors that emerge in Conway's Game of Life!

About

This repository contains a Python implementation of Conway's Game of Life using the Pygame library for visualization and user interaction.

Topics

Resources

License

Stars

Watchers

Forks

Languages