Skip to content

Implementation of the Conway's Game of Life in Python.

Notifications You must be signed in to change notification settings

sopticek/game-of-life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Game of Life

Implementation of the Conway's Game of Life in Python.

Usage

  1. Clone this repository.
  2. Run game-of-life.py FILE, where FILE is the input game.
  3. The script periodically prints the game and updates it.

A game is a text file containing a rectangular lattice, where x denotes a live cell and (space) denotes a dead cell.

Example:

    xxx   xxx

  x    x x    x
  x    x x    x
  x    x x    x
    xxx   xxx

    xxx   xxx
  x    x x    x
  x    x x    x
  x    x x    x

    xxx   xxx

For more examples, see the games directory.

Testing

The script's code is covered by unit tests. To execute them, simply run make test. It will run the tests by using nosetests, so make sure you have it installed.

If you want to generate code coverage, run make test-coverage and open coverage/index.html in your favorite web browser. Once again, you need to have nosetests installed.

Copyright and License

Copyright 2014 Daniela Ďuričeková daniela.duricekova@protonmail.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

About

Implementation of the Conway's Game of Life in Python.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published