1. Shlomi Fish
  2. kakuro-cross-sums

Commits

shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b  committed bfc4e06

Removed two assignments.

  • Participants
  • Parent commits 75f5b39
  • Branches default

Comments (0)

Files changed (1)

File solver/ruby/kakuro-board.rb

View file
                 @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