Project

rubylife

0.0
No commit activity in last 3 years
No release in over 3 years
A Conway's Game of Life implementation written in Ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.13
~> 10.0
~> 3.0
 Project Readme

Rubylife

An implementation of Conway's Game of Life in Ruby

For demonstration

$ bundle install
$ rspec --tag glider

Output:

  Glider
"Initial pattern:"
"___|_X_|___"
"___|___|_X_"
"_X_|_X_|_X_"
"====================== Round 1"
"___|___|___"
"_X_|___|_X_"
"___|_X_|_X_"
"====================== Round 2"
"___|___|___"
"___|___|_X_"
"___|_X_|_X_"
"====================== Round 3"
"___|___|___"
"___|_X_|_X_"
"___|_X_|_X_"
"====================== Round 4"
"___|___|___"
"___|_X_|_X_"
"___|_X_|_X_"
"====================== Round 5"
"___|___|___"
"___|_X_|_X_"
"___|_X_|_X_"
"====================== Round 6"
"___|___|___"
"___|_X_|_X_"
"___|_X_|_X_"
"====================== Round 7"
"___|___|___"
"___|_X_|_X_"
"___|_X_|_X_"
"====================== Round 8"
"___|___|___"
"___|_X_|_X_"
"___|_X_|_X_"
"====================== Round 9"
"___|___|___"
"___|_X_|_X_"
"___|_X_|_X_"
"====================== Round 10"
"___|___|___"
"___|_X_|_X_"
"___|_X_|_X_"
    should work

Finished in 0.01018 seconds (files took 0.11499 seconds to load)

Installation

Add this line to your application's Gemfile:

gem 'rubylife'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rubylife

Usage

game = Rubylife::Game.new(Rubylife::Board.new, [[2,0],[2,1],[2,2],[1,2],[0,1]])
game.tick!