Commits

Anonymous committed a6b9dbe

Extract a method.

Comments (0)

Files changed (1)

solver/ruby/lib/kakuro_solver/board.rb

             return
         end
 
+        def calc_constraints_loop
+            DIRS.each do |dir|
+                calc_dir_constraint(dir)
+            end
+        end
+
         def calc_all
 
             @remaining_constraints = []
             @possible_cell_values = @initial_cell_values
 
-            DIRS.each do |dir|
-                calc_dir_constraint(dir)
-            end
+            calc_constraints_loop
 
             return
         end