Пример #1
0
        public void SmartAI_TakeTurn_PreviousChoiceOneAIChoosesThree()
        {
            SmartGameAI ai = new SmartGameAI();

            int   candyCount   = 13;
            Moves previousMove = Moves.One;

            for (int i = 0; i < 500; i++)
            {
                Moves choice = ai.TakeTurn(previousMove, candyCount);
                Assert.IsTrue(choice == Moves.Three);
            }
        }
Пример #2
0
        public void SmartAI_TakeTurn_ThreeCandiesRemainValidChoice()
        {
            SmartGameAI ai = new SmartGameAI();

            int   candyCount   = 13;
            Moves previousMove = Moves.Three;

            for (int i = 0; i < 500; i++)
            {
                Moves choice = ai.TakeTurn(previousMove, candyCount);
            }

            // Any Error Here from the ai will break this test
        }
Пример #3
0
        public void SmartAI_TakeTurn_OneCandyRemainsValidChoice()
        {
            SmartGameAI ai = new SmartGameAI();

            int   candyCount   = 1;
            Moves previousMove = Moves.Three;

            for (int i = 0; i < 500; i++)
            {
                Moves choice = ai.TakeTurn(previousMove, candyCount);

                // AI Should always choose One
                Assert.IsTrue(choice == Moves.One);
            }

            // Any Error Here from the ai will break this test
        }
Пример #4
0
        public void SmartAI_TakeTurn_TwoCandiesRemainValidChoice()
        {
            SmartGameAI ai = new SmartGameAI();

            int   candyCount   = 2;
            Moves previousMove = Moves.Three;

            for (int i = 0; i < 500; i++)
            {
                Moves choice = ai.TakeTurn(previousMove, candyCount);

                // AI Should never choose Three
                Assert.IsFalse(choice == Moves.Three);
            }

            // Any Error Here from the ai will break this test
        }