Git Product home page Git Product logo

game-of-life's Introduction

Game of Life

This is an implementation of Conway's Game of Life, which I threw together mostly on a Sunday afternoon.

Check it out at gol.michd.me!

Some of the code structure and ideas may look familiar if you're used to working with C# as I am, in daily programming. It's certainly a nice language. The goal in my architectural decisions was to have a proper separation of concerns. It vaguely follows the MVC (model view controller) pattern.

The actual algorithm implementing Conway's 4 rules lives in its own files, and is fairly plug and play for other transforming algorithms.

Existing features

  • Period display (shows the frame count into the cellular automation process)
  • Run/Pause
  • Frame by frame progress using a button
  • Rudimentary seed editing
  • Reset to seed
  • Configurable delay between periods
  • Configurable grid size (number of cells to a side of a square, max 200x200)
  • Colorised updates indicating cells that have just become alive or died (toggle-able)
  • Sharing grid seeds via URL (yay!)

Future ideas

These are in order of how much I want to do them (first = do first)

  • Better editing (click and drag to draw several cell states)
  • Toggle-able gridlines (This is already in code, but disabled/hidden because of artifacting issues)
  • Ability to set size to some non-square size
  • Resizable canvas / full-screen mode

Contributing

You are welcome to send pull requests for any of the "future ideas" listed. Please spend some time reading the existing code and try to stick to the same code style. Most basic: indent = 2 spaces. If there's enough/any interest I'll add a proper contributing document with some standards.

Thanks for your interest!

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.