Ejemplo n.º 1
0
        private static void ComparePlayers(int gameCount, CardCountPair[] startingCards, TestOutput testOutput)
        {
            var gameLogFactory = new GameLogFactory();

            var player1 = Strategies.BigMoneyWithCard.Player(Cards.Witch, cardCount: 2);
            var player2 = Strategies.BigMoneyWithCard.Player(Cards.Witch, cardCount: 2);

            var builder = new GameConfigBuilder();
            builder.SetKingdomCards(player1, player2);
            if (startingCards != null)
                builder.SetStartingDeck(startingCards);

            var gameConfig = builder.ToGameConfig();

            testOutput.ComparePlayers(
                Strategies.BigMoneyWithCard.Player(Cards.Witch, cardCount: 2),
                Strategies.BigMoneyWithCard.Player(Cards.Witch, cardCount: 2),
                gameConfig,
                rotateWhoStartsFirst: true,
                numberOfGames: gameCount,
                createGameLog: new Dominion.Data.CreateGameLog(gameLogFactory.CreateGameLog));

            System.Console.WriteLine("Curses Split was Uneven {0}%", gameLogFactory.UnEvenSplitPercent);
            System.Console.WriteLine();
            System.Console.WriteLine("When the curses were not split, Player 1 won the curse split {0}/{1}", gameLogFactory.Player1WinPercent, gameLogFactory.Player2WinPercent);
        }
Ejemplo n.º 2
0
        private static void ComparePlayers(int gameCount, CardCountPair[] startingCards)
        {
            var gameLogFactory = new GameLogFactory();

            var player1 = Strategies.BigMoneyWithCard.Player(Cards.Witch, cardCount: 2);
            var player2 = Strategies.BigMoneyWithCard.Player(Cards.Witch, cardCount: 2);

            var builder = new GameConfigBuilder();

            PlayerAction.SetKingdomCards(builder, player1, player2);
            if (startingCards != null)
            {
                builder.SetStartingDeck(startingCards);
            }

            var gameConfig = builder.ToGameConfig();

            Program.ComparePlayers(
                Strategies.BigMoneyWithCard.Player(Cards.Witch, cardCount: 2),
                Strategies.BigMoneyWithCard.Player(Cards.Witch, cardCount: 2),
                gameConfig,
                firstPlayerAdvantage: true,
                numberOfGames: gameCount,
                createGameLog: new CreateGameLog(gameLogFactory.CreateGameLog));

            System.Console.WriteLine("Curses Split was Uneven {0}%", gameLogFactory.UnEvenSplitPercent);
            System.Console.WriteLine();
            System.Console.WriteLine("When the curses were not split, Player 1 won the curse split {0}/{1}", gameLogFactory.Player1WinPercent, gameLogFactory.Player2WinPercent);
        }
Ejemplo n.º 3
0
        private static void ComparePlayers(int gameCount, CardCountPair[] startingCards)
        {
            var gameLogFactory = new GameLogFactory();

            var player1 = Strategies.BigMoneyWithCard.Player(Cards.Witch, 1, cardCount: 2);
            var player2 = Strategies.BigMoneyWithCard.Player(Cards.Witch, 2, cardCount: 2);

            var builder = new GameConfigBuilder();
            PlayerAction.SetKingdomCards(builder, player1, player2);
            if (startingCards != null)
                builder.SetStartingDeck(startingCards);

            var gameConfig = builder.ToGameConfig();

            Program.ComparePlayers(
                Strategies.BigMoneyWithCard.Player(Cards.Witch, 1, cardCount: 2),
                Strategies.BigMoneyWithCard.Player(Cards.Witch, 2, cardCount: 2),
                gameConfig,
                firstPlayerAdvantage: true,
                numberOfGames: gameCount,
                createGameLog: new Program.CreateGameLog(gameLogFactory.CreateGameLog));

            System.Console.WriteLine("Curses Split was Uneven {0}%", gameLogFactory.UnEvenSplitPercent);
            System.Console.WriteLine();
            System.Console.WriteLine("When the curses were not split, Player 1 won the curse split {0}/{1}", gameLogFactory.Player1WinPercent, gameLogFactory.Player2WinPercent);
        }
Ejemplo n.º 4
0
 public GameLog(GameLogFactory factory)
 {
     this.factory = factory;
 }
Ejemplo n.º 5
0
 public GameLog(GameLogFactory factory)
 {
     this.factory = factory;
 }