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); }
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); }