summaryrefslogtreecommitdiffstats
path: root/CLI/ruby/lib/game_of_life/generators
diff options
context:
space:
mode:
authora14m <[email protected]>2020-12-02 14:47:04 +0100
committera14m <[email protected]>2020-12-02 14:51:33 +0100
commit81921690c1c090976f4f31262e8a8e7fb010e2db (patch)
treecab90688144d1c5cdd3e36527763b4032f0e0422 /CLI/ruby/lib/game_of_life/generators
parentbeef1220ecae3d4b3faec49059b131488bc8d016 (diff)
Use x,y coordinates instead of pos_x (and disable rubocop warning)
Diffstat (limited to 'CLI/ruby/lib/game_of_life/generators')
-rw-r--r--CLI/ruby/lib/game_of_life/generators/input.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/CLI/ruby/lib/game_of_life/generators/input.rb b/CLI/ruby/lib/game_of_life/generators/input.rb
index cbde075..05aab1c 100644
--- a/CLI/ruby/lib/game_of_life/generators/input.rb
+++ b/CLI/ruby/lib/game_of_life/generators/input.rb
@@ -34,7 +34,7 @@ module GameOfLife
universe = GameOfLife::Universe.new(height: height, width: width)
(0...height).each do |i|
(0...width).each do |j|
- cell = { pos_x: j, pos_y: i, alive: parsed_input.fetch(i, nil)&.fetch(j, nil) }
+ cell = { x: j, y: i, alive: parsed_input.fetch(i, nil)&.fetch(j, nil) }
universe[i][j] = ::GameOfLife::Cell.new(cell)
end
end