static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); PokerApp poker = new PokerApp(); #if REQUIRE_KEY Keys.RequireKey(); #endif int[] cards = IO.parseCards("7s 6d"); // if (!Hand.ValidateHand(str)) // IO.Message("invalid formart"); Process pp = Process.GetCurrentProcess(); Stopwatch sw = new Stopwatch(); sw.Start(); TimeSpan tb = pp.TotalProcessorTime; // poker.testHands(); // poker.testHand(IO.parseCards("As 2s 3s 4s 5s")); // Application.Run(new PokerUI(poker)); // double prob = poker.MyComputeProb(cards, new int[TAKEN_CARDS], 0, 1, ProbMode.Enumerate); double prob = poker.HandEvalComputeProb("7s 6d", "", 0, 1); TimeSpan te = pp.TotalProcessorTime; sw.Stop(); IO.Message("Computed " + TOTAL_SYMS + " hands in " + (te-tb).TotalMilliseconds + " millis: " + (double) TOTAL_SYMS / (te - tb).TotalSeconds + " games/sec"); IO.Message("Win Prob: " + prob * 100 + "%"); // IO.Message("Computed " + TOTAL_SYMS + " hands in " + sw.ElapsedMilliseconds + " millis"); // poker.printCounts(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); PokerApp poker = new PokerApp(); #if REQUIRE_KEY Keys.RequireKey(); #endif int[] cards = IO.parseCards("7s 6d"); // if (!Hand.ValidateHand(str)) // IO.Message("invalid formart"); Process pp = Process.GetCurrentProcess(); Stopwatch sw = new Stopwatch(); sw.Start(); TimeSpan tb = pp.TotalProcessorTime; // poker.testHands(); // poker.testHand(IO.parseCards("As 2s 3s 4s 5s")); // Application.Run(new PokerUI(poker)); // double prob = poker.MyComputeProb(cards, new int[TAKEN_CARDS], 0, 1, ProbMode.Enumerate); double prob = poker.HandEvalComputeProb("7s 6d", "", 0, 1); TimeSpan te = pp.TotalProcessorTime; sw.Stop(); IO.Message("Computed " + TOTAL_SYMS + " hands in " + (te - tb).TotalMilliseconds + " millis: " + (double)TOTAL_SYMS / (te - tb).TotalSeconds + " games/sec"); IO.Message("Win Prob: " + prob * 100 + "%"); // IO.Message("Computed " + TOTAL_SYMS + " hands in " + sw.ElapsedMilliseconds + " millis"); // poker.printCounts(); }
public PokerSimulatorUI(PokerApp pc) { calc = pc; InitializeComponent(); }