コード例 #1
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);
        }