diff options
author | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-06-17 17:41:52 +0200 |
---|---|---|
committer | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-06-17 17:41:52 +0200 |
commit | e06ba8ea1346e5045a34508648ac93150aacb01a (patch) | |
tree | 5d214438109aef0c622c29c8b78ab608cb1fafd8 /test/jrummikub/ai/fdsolver/SolverTest.java | |
parent | 1b9c7c47783a0872ca3bedfad6fb120f611d354b (diff) | |
download | JRummikub-e06ba8ea1346e5045a34508648ac93150aacb01a.tar JRummikub-e06ba8ea1346e5045a34508648ac93150aacb01a.zip |
Reimplemented AI (old one was too slow)
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@443 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'test/jrummikub/ai/fdsolver/SolverTest.java')
-rw-r--r-- | test/jrummikub/ai/fdsolver/SolverTest.java | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/test/jrummikub/ai/fdsolver/SolverTest.java b/test/jrummikub/ai/fdsolver/SolverTest.java deleted file mode 100644 index ae32b07..0000000 --- a/test/jrummikub/ai/fdsolver/SolverTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package jrummikub.ai.fdsolver; - -import static org.junit.Assert.assertEquals; -import jrummikub.ai.fdsolver.constraint.LessThan; -import jrummikub.ai.fdsolver.constraint.LessThanConst; - -import org.junit.Test; - -public class SolverTest { - @Test - public void test() { - Solver solver = new Solver(); - - Var<Integer> x = solver.makeVar(1, 2, 3); - Var<Integer> y = solver.makeRangeVar(1, 13); - - solver.addConstraint(new LessThan<Integer>(false, y, x)); - - while (solver.solve()) { - solver.record(); - solver.addConstraint(new LessThanConst<Integer>(false, x, x.getValue())); - } - solver.restore(); - assertEquals(2, (int)x.getValue()); - assertEquals(1, (int)y.getValue()); - } -} |