2017 © Pedro PelĂĄez
 

library gof

Game of Life

image

mjacobus/gof

Game of Life

  • Monday, September 28, 2015
  • by mjacobus
  • Repository
  • 2 Watchers
  • 2 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Game of Life - A PHP Implementation

After a very fun code retreat delivered by Urs Reupke at Goodgame Studios I decided that I wanted to finish that exercise., (*1)

That was the Game of Life implementation, (*2)

Code information:, (*3)

Build Status Coverage Status Code Climate Scrutinizer Code Quality, (*4)

Package information:, (*5)

Latest Stable Version Total Downloads Latest Unstable Version License Dependency Status, (*6)

Rules

The universe of the Game of Life is an infinite two-dimensional orthogonal grid of square cells, each of which is in one of two possible states, alive or dead. Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:, (*7)

  1. Any live cell with fewer than two live neighbours dies, as if caused by under-population. (loneliness death)
  2. Any live cell with two or three live neighbours lives on to the next generation. (Happy Community Wont Change)
  3. Any live cell with more than three live neighbours dies, as if by overcrowding. (over population death)
  4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction. (ThreeLiveNeighboursRessurection)

The initial pattern constitutes the seed of the system. The first generation is created by applying the above rules simultaneously to every cell in the seed—births and deaths occur simultaneously, and the discrete moment at which this happens is sometimes called a tick (in other words, each generation is a pure function of the preceding one). The rules continue to be applied repeatedly to create further generations., (*8)

Source: Wikipedia., (*9)

Usage

Web

CLI

  • run php examples/cli/run.php

Installing

Installing Via Composer

Append the lib to your requirements key in your composer.json., (*10)

{
    // composer.json
    // [..]
    require: {
        // append this line to your requirements
        "mjacobus/gof": "*"
    }
}

Alternative install

Issues/Features proposals

Here is the issue tracker., (*11)

Contributing

Please refer to the contribuiting guide., (*12)

Lincense

MIT, (*13)

Authors

The Versions

28/09 2015

dev-master

9999999-dev

Game of Life

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Marcelo Jacobus