Пример #1
0
        public void TestDangerousGame()
        {
            var testSubject = new PayoffMatrix(
                playerA, new[] { "A", "B" }, "Reader",
                playerB, new[] { "A", "B" }, "Author");

            Console.WriteLine(testSubject);
            var playerAChooses = testSubject.GetPlayerChoices(true);

            Assert.IsNotNull(playerAChooses);
            foreach (var pac in playerAChooses)
            {
                Console.WriteLine(pac.ToString(true));
            }

            var playerBChooses = testSubject.GetPlayerChoices(false);

            Assert.IsNotNull(playerBChooses);
            foreach (var pab in playerBChooses)
            {
                Console.WriteLine(pab.ToString(false));
            }
        }
Пример #2
0
        public void TestIt()
        {
            var testSubject = new PayoffMatrix(
                playerA, new[] { "Skating Rink", "Football Game" }, "Haley",
                playerB, new[] { "Skating Rink", "Football Game" }, "Marge");

            Console.WriteLine(testSubject);
            var playerAChooses = testSubject.GetPlayerChoices(true);

            Assert.IsNotNull(playerAChooses);
            foreach (var pac in playerAChooses)
            {
                Console.WriteLine(pac.ToString(true));
            }

            var playerBChooses = testSubject.GetPlayerChoices(false);

            Assert.IsNotNull(playerBChooses);
            foreach (var pab in playerBChooses)
            {
                Console.WriteLine(pab.ToString(false));
            }
        }