Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nnbnh/life.rb

⠬⠆My simple "Conway's Game of Life" in Ruby
https://github.com/nnbnh/life.rb

cli-game game-of-life gameoflife ruby tui-game

Last synced: about 1 month ago
JSON representation

⠬⠆My simple "Conway's Game of Life" in Ruby

Awesome Lists containing this project

README

        

Conway's Game of Life


But in Ruby




License: GPL-3.0
Development completed

## ⌨️ Usage

Download [the file](https://github.com/NNBnh/life.rb/blob/main/life.rb) then load it in `irb`:

```rb
require_relative "path/to/life"
```

For convenience, use this board generator:

```rb
def universe_gen(d = 16, r = 0.1) d = [d, d] if Array(d).one?; Array.new(d[1]) { Array.new(d[0]) { rand <= r } } end
```

Then start the simulation:

```rb
GameOfLife.new(universe_gen([64, 32], 0.075)).play
```

## 💌 Credits

Special thanks to:
- [**APL + Game of Life = ❤️**](https://www.youtube.com/watch?v=pMslgySQ8nc) by [Code_report](https://www.youtube.com/channel/UC1kBxkk2bcG78YBX7LMl9pQ)
- [**Game of Life**](https://wikipedia.org/wiki/Conway's_Game_of_Life) by [John Horton Conway](https://wikipedia.org/wiki/John_Horton_Conway)





---

>

Made with ❤️ by NNB


>
>

Buy Me a Coffee