コード例 #1
0
        [Test] public void Test()
        {
            var x = new Eradicator();
            var p = new Solver <Eradicator>();
            var s = p.Next(x, new Goal <Eradicator>(z => z.rats == 0));

            o((string)s, "Eradicate");
        }
コード例 #2
0
        [Test] public void TestLimit()
        {
            var x = new Eradicator();
            var p = new Solver <Eradicator>();

            p.maxIter = 10;
            var s = p.Next(x, new Goal <Eradicator>(z => z.rats == -1));

            o(s, null);
            // TODO - MaxIterExceeded was expected here
            o(p.status == PlanningState.Failed);
        }