Commits

Anonymous committed bfc4e06

Removed two assignments.

Comments (0)

Files changed (1)

solver/ruby/kakuro-board.rb

                 @dir = dir
 
                 @init_cell = board.cell(init_pos)
-                @constraint = init_cell.constraint(dir)
             end
 
             def run
-                return constraint && set_new_constraint
+                return init_cell.constraint(dir) && set_new_constraint
             end
 
             private
             attr_reader :dir, :init_pos, :constraint, :board, :init_cell
 
             def set_new_constraint
-                total_mask = board.calc_total_mask(init_pos, dir)
-
-                return init_cell.filter_constraint_with_mask(dir, total_mask)
+                return init_cell.filter_constraint_with_mask(
+                    dir, 
+                    board.calc_total_mask(init_pos, dir)
+                )
             end
         end