Exemple #1
0
        public void monsterZone()
        {
            TemporalSpecification RMonster2 = new Always(G => { bool result = true; for (int i = 0; i < 20; i++)
                                                                {
                                                                    result = result && (G.getMonster("M" + i) == null || G.getMonster("M" + i).location.zone == G.getMonster("M" + i).prevZone);
                                                                }
                                                                return(result); });

            Assert.AreEqual(Judgement.RelevantlyValid, RMonster2.evaluate(testsuites, threshold));
        }
Exemple #2
0
        public void NodeCap()
        {
            TemporalSpecification RNodeCap = new Always(G => HelperPredicates.forall(G.dungeon.nodes(), n => n.monsters.Count <= n.capacity));

            Assert.AreEqual(Judgement.RelevantlyValid, RNodeCap.evaluate(testsuites, threshold));
        }
Exemple #3
0
        public void Exit()
        {
            TemporalSpecification RExit = new Always(G => G.player.location.isReachable(G.dungeon.getExitnode()));

            Assert.AreEqual(Judgement.RelevantlyValid, RExit.evaluate(testsuites, threshold));
        }
Exemple #4
0
        public void HPTest()
        {
            TemporalSpecification RHP = new Always(G => G.player.HP <= G.player.HPmax);

            Assert.AreEqual(Judgement.RelevantlyValid, RHP.evaluate(testsuites, threshold));
        }