example/sudoku-set.rb in gecoder-0.9.0 vs example/sudoku-set.rb in gecoder-0.9.1
- old
+ new
@@ -2,10 +2,12 @@
require 'enumerator'
# Solves the sudoku problem using sets. The model used is a fairly direct
# translation of the corresponding Gecode example:
# http://www.gecode.org/gecode-doc-latest/sudoku-set_8cc-source.html .
-class SudokuSet < Gecode::Model
+class SudokuSet
+ include Gecode::Mixin
+
# Takes a 9x9 matrix of values in the initial sudoku, 0 if the square is
# empty.
def initialize(predefined_values)
# Verify that the input is of a valid size.
@size = n = predefined_values.row_size