Giter Site home page Giter Site logo

talhaahussain / game-of-life-gui Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 10.25 MB

A (mostly) object-oriented implementation of John Horton Conway's Game of Life (1970) as a graphical user interface.

License: MIT License

Python 100.00%
conways-game-of-life game-of-life gui pygame simulation object-oriented-programming

game-of-life-gui's Introduction

Game-of-Life-GUI

A (mostly) object-oriented implementation of John Horton Conway's Game of Life (1970) as a graphical user interface. The Game of Life is a Turing complete cellular automaton, with evolution determined entirely by its initial state. This implementation is written in Python, using the Pygame library.

A GIF demonstration of the Game of Life

Description

Game of Life is a cellular automaton that involves a universe of square cells, arranged in a grid. A cell can either be alive or dead, and interacts with neighbours, in all 8 directions (Moore neighbourhood). At each time step, each cell follows these rules:

  • A live cell with less than 2 alive neighbours dies (starvation)
  • A live cell with 2 or 3 alive neighbours remains alive
  • A live cell with more than 3 alive neighbours dies (overpopulation)
  • A dead cell with exactly 3 alive neighbours becomes live (reproduction)

Currently, this version of Game of Life only allows for random initial seeds; future versions will support user input to customise the initial state.

Prerequisites

Prerequisites are viewable in requirements.txt.

Installation

Clone with:

git clone https://github.com/talhaahussain/Game-of-Life-GUI.git gameoflife
cd gameoflife/

Install prerequisites with:

pip install -r requirements.txt

Usage

Run with:

cd src/
python gameoflife.py

See also

find_neighbours.py

Boids-GUI - (in development)

game-of-life-gui's People

Contributors

talhaahussain avatar

Watchers

 avatar

game-of-life-gui's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.