Skip to content

Commit

Permalink
Pull out the solver.
Browse files Browse the repository at this point in the history
  • Loading branch information
benlaurie committed Apr 5, 2015
1 parent e8b8393 commit 0f467eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/c++/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -989,8 +989,9 @@ void sudoku_example() {
x.push_back(c.int_const(x_name.str().c_str()));
}

// each cell contains a value in {1, ..., 9}
solver s(c);

// each cell contains a value in {1, ..., 9}
for (unsigned i = 0; i < 9; ++i)
for (unsigned j = 0; j < 9; ++j) {
s.add(x[i * 9 + j] >= 1 && x[i * 9 + j] <= 9);
Expand Down

0 comments on commit 0f467eb

Please sign in to comment.