Commits

Anonymous committed 3821940

Convert init_cell to a method because it's only used once.

  • Participants
  • Parent commits 7bc99c5

Comments (0)

Files changed (1)

File solver/ruby/kakuro-board.rb

                 @board = board
                 @init_pos = init_pos
                 @dir = dir
-
-                @init_cell = board.cell(init_pos)
             end
 
             def run
             end
 
             private
-            attr_reader :dir, :init_pos, :board, :init_cell
+            attr_reader :dir, :init_pos, :board
+
+            def init_cell
+                return board.cell(init_pos)
+            end
         end
 
         def filter_constraints_cell_constraint_step(init_pos, dir)