mirror of
https://github.com/Z3Prover/z3
synced 2025-04-13 12:28:44 +00:00
.NET Example: Sudoku example bugfix. Many thanks to Ilya Mironov for reporting this issue.
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
b7c2d9054b
commit
210bca8f45
|
@ -485,7 +485,13 @@ namespace test_mapi
|
||||||
// each column contains a digit at most once
|
// each column contains a digit at most once
|
||||||
BoolExpr[] cols_c = new BoolExpr[9];
|
BoolExpr[] cols_c = new BoolExpr[9];
|
||||||
for (uint j = 0; j < 9; j++)
|
for (uint j = 0; j < 9; j++)
|
||||||
cols_c[j] = ctx.MkDistinct(X[j]);
|
{
|
||||||
|
IntExpr[] column = new IntExpr[9];
|
||||||
|
for (uint i = 0; i < 9; i++)
|
||||||
|
column[i] = X[i][j];
|
||||||
|
|
||||||
|
cols_c[j] = ctx.MkDistinct(column);
|
||||||
|
}
|
||||||
|
|
||||||
// each 3x3 square contains a digit at most once
|
// each 3x3 square contains a digit at most once
|
||||||
BoolExpr[][] sq_c = new BoolExpr[3][];
|
BoolExpr[][] sq_c = new BoolExpr[3][];
|
||||||
|
|
Loading…
Reference in a new issue