Ejemplo n.º 1
0
        public void Unless_RAlert_Test()
        {
            List <GamePlay> plays = loadSavedGamePlays(allReplays);

            foreach (GamePlay gp in plays)
            {
                // test that this specifation is respected by each game-play:
                Game          game       = gp.getGame();
                bool[]        zone_alert = new bool[game.dungeon.difficultyLevel + 2];
                Specification S          = new Unless(G => contested_then_alert(G, zone_alert), G => player_other_zone(G, zone_alert));
                gp.replay(S);
                Assert.IsTrue(S.getVerdict());
            }
        }
Ejemplo n.º 2
0
        public void UnlessPredicate()
        {
            List <GamePlay> plays = loadSavedGamePlays(new List <string>()
            {
                "Combat1", "End"
            });

            foreach (GamePlay gp in plays)
            {
                // test that this specifation is respected by each game-play:
                int           M = (int)gp.numberOfMonsters;
                Specification S = new Unless(G => countMonsters(G) == M, G => countMonsters(G) < M);
                Console.WriteLine("Test");
                gp.replay(S);
                Assert.IsTrue(S.getVerdict());
            }
        }