private static void SimulateGames(IGameSimulator gameSimulator) { Console.WriteLine($"Running {gameSimulator.GetType().Name}..."); var simulationResult = gameSimulator.Simulate(10000); Console.WriteLine(simulationResult.SimulationDuration); Console.WriteLine($"Total games: {simulationResult.FirstPlayerWins:0,0} - {simulationResult.SecondPlayerWins:0,0}"); Console.WriteLine($"Hands played: {simulationResult.HandsPlayed:0,0}"); Console.WriteLine(new string('=', 75)); }
private static void SimulateGames(IGameSimulator gameSimulator) { Console.WriteLine($"Running {gameSimulator.GetType().Name}..."); var simulationResult = gameSimulator.Simulate(100); Console.WriteLine(simulationResult.SimulationDuration); Console.WriteLine($"Total games: {simulationResult.FirstPlayerWins:0,0} - {simulationResult.SecondPlayerWins:0,0}"); Console.WriteLine($"Hands played: {simulationResult.HandsPlayed:0,0}"); Console.WriteLine(new string('=', 75)); }
private static void SimulateGames(IGameSimulator gameSimulator, int gamesCount = 100000) { Console.WriteLine($"Running {gameSimulator.GetType().Name}..."); var simulationResult = gameSimulator.Simulate(gamesCount); Console.WriteLine(simulationResult.SimulationDuration); Console.WriteLine($"Games: {simulationResult.FirstPlayerWins:0,0} - {simulationResult.SecondPlayerWins:0,0} (total: {gamesCount:0,0})"); Console.WriteLine($"Rounds: {simulationResult.FirstPlayerTotalRoundPoints:0,0} - {simulationResult.SecondPlayerTotalRoundPoints:0,0} (total: {simulationResult.RoundsPlayed:0,0})"); Console.WriteLine($"Global counters: {string.Join(", ", GlobalStats.GlobalCounterValues)} (closed: {GlobalStats.GamesClosedByPlayer:0,0})"); Console.WriteLine(new string('=', 75)); }
public static GameSimulationResult SimulateGames(IGameSimulator gameSimulator) { //Console.WriteLine($"Running {gameSimulator.GetType().Name}..."); Console.WriteLine($"Running {gameSimulator}..."); var simulationResult = gameSimulator.Simulate(100); //Console.WriteLine(simulationResult.SimulationDuration); Console.WriteLine($"Total games: {simulationResult.FirstPlayerWins:0,0} - {simulationResult.SecondPlayerWins:0,0}"); //Console.WriteLine($"Hands played: {simulationResult.HandsPlayed:0,0}"); Console.WriteLine(new string('=', 50)); return simulationResult; }
private static void SimulateGames(IGameSimulator gameSimulator) { Console.WriteLine($"Running {gameSimulator.GetType().Name}..."); var simulationResult = gameSimulator.Simulate(100000); Console.WriteLine(simulationResult.SimulationDuration); Console.WriteLine($"Total games: {simulationResult.FirstPlayerWins:0,0} - {simulationResult.SecondPlayerWins:0,0}"); Console.WriteLine($"Rounds played: {simulationResult.RoundsPlayed:0,0}"); Console.WriteLine( $"Total round points: {simulationResult.FirstPlayerTotalRoundPoints:0,0} - {simulationResult.SecondPlayerTotalRoundPoints:0,0}"); Console.WriteLine("Closed games: {0}", GlobalStats.GamesClosedByPlayer); Console.WriteLine(new string('=', 75)); }
public static GameSimulationResult SimulateGames(IGameSimulator gameSimulator) { //Console.WriteLine($"Running {gameSimulator.GetType().Name}..."); Console.WriteLine($"Running {gameSimulator}..."); var simulationResult = gameSimulator.Simulate(100); //Console.WriteLine(simulationResult.SimulationDuration); Console.WriteLine($"Total games: {simulationResult.FirstPlayerWins:0,0} - {simulationResult.SecondPlayerWins:0,0}"); //Console.WriteLine($"Hands played: {simulationResult.HandsPlayed:0,0}"); Console.WriteLine(new string('=', 50)); return(simulationResult); }
private static void SimulateGames(IGameSimulator gameSimulator) { int simulationsCount = 1000; // DefaultSimulationsCount Console.WriteLine($"Running {gameSimulator.GetType().Name}..."); var simulationResult = gameSimulator.Simulate(simulationsCount); Console.WriteLine(simulationResult.SimulationDuration); Console.WriteLine($"Total games: {simulationResult.FirstPlayerWins:0,0} - {simulationResult.SecondPlayerWins:0,0}"); Console.WriteLine($"Rounds played: {simulationResult.RoundsPlayed:0,0}"); Console.WriteLine( $"Total round points (Our player): {simulationResult.FirstPlayerTotalRoundPoints:0,0} - {simulationResult.SecondPlayerTotalRoundPoints:0,0}"); Console.WriteLine(new string('=', 75)); Console.ReadKey(); }