diff options
| author | Ahmed AbdelHalim <[email protected]> | 2023-06-30 16:00:40 +0200 |
|---|---|---|
| committer | Ahmed AbdelHalim <[email protected]> | 2023-06-30 16:00:40 +0200 |
| commit | f64697a5aede493d52724860856bcbf9f5803169 (patch) | |
| tree | bc804c7bca9997ad8daea75a7843f7ca211981fb /CLI/ruby/lib/game_of_life | |
| parent | d124465bc3a83a614eb10eb7c6d6ddff2fc00f35 (diff) | |
Update and fix rubocop offenses
Diffstat (limited to 'CLI/ruby/lib/game_of_life')
| -rw-r--r-- | CLI/ruby/lib/game_of_life/generators/seed.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CLI/ruby/lib/game_of_life/generators/seed.rb b/CLI/ruby/lib/game_of_life/generators/seed.rb index 6399945..ba7074b 100644 --- a/CLI/ruby/lib/game_of_life/generators/seed.rb +++ b/CLI/ruby/lib/game_of_life/generators/seed.rb @@ -32,7 +32,7 @@ module GameOfLife # Create a pseudo(stable) random generator from the seed # Generate a sequence of bytes to cover the Game of Life Universe plane # each byte can be unpacked into binary data string (ex. "01101011") - raw = Random.new(seed).bytes(width * height).unpack1("B*").split("").each_slice(width) + raw = Random.new(seed).bytes(width * height).unpack1("B*").chars.each_slice(width) raw.map { |row| row.map { |char| char.eql?("1") } } end |
