Esempio n. 1
0
        public void TestJoinFaction()
        {
            Character  character      = CreateCharacterMelee();
            Character  characterEnemy = CreateCharacterMelee();
            Faction    newFaction     = CreateFaction();
            Iteration4 iteration4     = new Iteration4(character, characterEnemy);

            iteration4.JoinFaction(newFaction, character);

            Assert.AreEqual(true, character.Factions.Contains(newFaction), "Join faction");
        }
Esempio n. 2
0
        public void TestAlliesNotDamage()
        {
            Character  character      = CreateCharacterMelee();
            Character  characterEnemy = CreateCharacterMelee();
            Faction    newFaction     = CreateFaction();
            Iteration4 iteration4     = new Iteration4(character, characterEnemy);

            iteration4.JoinFaction(newFaction, character);
            iteration4.JoinFaction(newFaction, characterEnemy);

            iteration4.Damage(200);
            Assert.AreEqual(characterEnemy.MaxHealth, characterEnemy.Health, "Not damage");
        }
Esempio n. 3
0
        public void TestAlliesFaction()
        {
            Character  character      = CreateCharacterMelee();
            Character  characterEnemy = CreateCharacterMelee();
            Faction    newFaction     = CreateFaction();
            Iteration4 iteration4     = new Iteration4(character, characterEnemy);

            iteration4.JoinFaction(newFaction, character);
            iteration4.JoinFaction(newFaction, characterEnemy);

            bool allies = iteration4.Allies(characterEnemy);

            Assert.AreEqual(true, allies, "Are allies");
        }
        private static void Main()
        {
            Console.WriteLine("Starting test setup.");

            // TEST BASIC AI

            //OneTurn();
            //FullGame();
            //RandomGames();
            //TestPOGame();
            //TestFullGames();
            //TestTournament();

            AbstractAgent player1      = new Iteration4();
            CardClass     player1Class = CardClass.MAGE;
            List <Card>   player1Deck  = Decks.RenoKazakusMage;

            AbstractAgent player2 = new OneStepLookahead();            //new DynamicLookaheadAgent();  GreedyAgent  OneStepLookahead
            int           nrGames = 15;

            TestPOGame(nrGames, 1, player1, player2, player1Class, CardClass.MAGE, player1Deck, Decks.RenoKazakusMage);
            TestPOGame(nrGames, 2, player1, player2, player1Class, CardClass.MAGE, player1Deck, Decks.RenoKazakusMage);

            /*
             * Console.WriteLine("---Evaluate vs Mage---");
             * TestPOGame(nrGames, 1, player1, player2, player1Class, CardClass.MAGE, player1Deck, Decks.RenoKazakusMage);
             * TestPOGame(nrGames, 2, player1, player2, player1Class, CardClass.MAGE, player1Deck, Decks.RenoKazakusMage);
             *
             * Console.WriteLine("---Evaluate vs Warrior---");
             * TestPOGame(nrGames, 1, player1, player2, player1Class, CardClass.WARRIOR, player1Deck, Decks.AggroPirateWarrior);
             * TestPOGame(nrGames, 2, player1, player2, player1Class, CardClass.WARRIOR, player1Deck, Decks.AggroPirateWarrior);
             *
             * //Console.WriteLine("---Evaluate vs Druid---");
             * //TestPOGame(nrGames, 1, player1, player2, player1Class, CardClass.DRUID, player1Deck, Decks.MurlocDruid);
             * //TestPOGame(nrGames, 2, player1, player2, player1Class, CardClass.DRUID, player1Deck, Decks.MurlocDruid);
             *
             * Console.WriteLine("---Evaluate vs Shaman---");
             * TestPOGame(nrGames, 1, player1, player2, player1Class, CardClass.SHAMAN, player1Deck, Decks.MidrangeJadeShaman);
             * TestPOGame(nrGames, 2, player1, player2, player1Class, CardClass.SHAMAN, player1Deck, Decks.MidrangeJadeShaman);
             *
             * Console.WriteLine("---Evaluate vs Paladin---");
             * TestPOGame(nrGames, 1, player1, player2, player1Class, CardClass.PALADIN, player1Deck, Decks.MidrangeBuffPaladin);
             * TestPOGame(nrGames, 2, player1, player2, player1Class, CardClass.PALADIN, player1Deck, Decks.MidrangeBuffPaladin);
             *
             * //error in the hunter? -> hunter is not evaluated in 2020 and throws some errors
             * //Console.WriteLine("---Evaluate vs Hunter---");
             * //TestPOGame(nrGames, 1, player1, player2, player1Class, CardClass.HUNTER, player1Deck, Decks.MidrangeSecretHunter);
             * //TestPOGame(nrGames, 2, player1, player2, player1Class, CardClass.HUNTER, player1Deck, Decks.MidrangeSecretHunter);
             *
             * Console.WriteLine("---Evaluate vs Warlock---");
             * TestPOGame(nrGames, 1, player1, player2, player1Class, CardClass.WARLOCK, player1Deck, Decks.ZooDiscardWarlock);
             * TestPOGame(nrGames, 2, player1, player2, player1Class, CardClass.WARLOCK, player1Deck, Decks.ZooDiscardWarlock);
             *
             * //error in the rougue?
             * //Console.WriteLine("---Evaluate vs Rogue---");
             * //TestPOGame(nrGames, 1, player1, player2, player1Class, CardClass.ROGUE, player1Deck, Decks.MiraclePirateRogue); //ERROR!
             * //TestPOGame(nrGames, 2, player1, player2, player1Class, CardClass.ROGUE, player1Deck, Decks.MiraclePirateRogue);
             *
             * Console.WriteLine("---Evaluate vs Priest---");
             * TestPOGame(nrGames, 1, player1, player2, player1Class, CardClass.PRIEST, player1Deck, Decks.RenoKazakusDragonPriest);
             * TestPOGame(nrGames, 2, player1, player2, player1Class, CardClass.PRIEST, player1Deck, Decks.RenoKazakusDragonPriest);
             */

            Console.WriteLine("Test ended!");
            Console.WriteLine("EXIT");             //print EXIT for the learning program to know when to stop it
            Console.ReadLine();
        }