But in Ruby
Download the file then load it in irb
:
require_relative "path/to/life"
For convenience, use this board generator:
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:
GameOfLife.new(universe_gen([64, 32], 0.075)).play
Special thanks to:
Made with ❤️ by NNB