Пример #1
0
        void handHistoryParser_PlayerBet(string playerName, float amount, HoldemGamePhase gamePhase)
        {
            HoldemPlayer p = (HoldemPlayer)FindPlayer(playerName);

            if (p == null)
            {
                Trace.WriteLine("Bet detected but the player is not in our list. Did he just join?");
                return;
            }


            // Flop
            if (gamePhase == HoldemGamePhase.Flop && !PlayerBetTheFlop)
            {
                // Did he raised preflop?
                if (p.HasPreflopRaisedThisRound())
                {
                    p.IncrementOpportunitiesToCBet(true);
                    PlayerCBet = true;
                }

                PlayerBetTheFlop = true;
            }


            p.HasBet(gamePhase);
        }
Пример #2
0
        void handHistoryParser_PlayerChecked(string playerName, HoldemGamePhase gamePhase)
        {
            HoldemPlayer p = (HoldemPlayer)FindPlayer(playerName);

            // On some clients, a player who is sitting out might be automatically made to check
            if (p == null)
            {
                Trace.WriteLine("Check detected but the player is not in our list. Is he sitting out?");
                return;
            }

            if (gamePhase == HoldemGamePhase.Preflop)
            {
                /* Steal raise opportunity */
                if (p.IsButton && !PlayerRaisedPreflop && !PlayerLimpedPreflop && !PlayerCheckedPreflop)
                {
                    p.IncrementOpportunitiesToStealRaise();
                }

                PlayerCheckedPreflop = true;
            }

            // Flop
            if (gamePhase == HoldemGamePhase.Flop && !PlayerBetTheFlop && p.HasPreflopRaisedThisRound())
            {
                p.IncrementOpportunitiesToCBet(false);
            }

            p.HasChecked(gamePhase);
        }