protected bool PlayerHandHasChanged(Hand playerHand)
 {
     return lastPlayerHand == null || !playerHand.Equals(lastPlayerHand);
 }
Exemple #2
0
        /* A mucked hand became available for this player */
        public override void MuckHandAvailable(Hand hand)
        {
            bool duplicate = hand.Equals(MuckedHand);
            base.MuckHandAvailable(hand);

            // Make sure we're not handling a duplicate... the parser might send multiple mucked hands
            if (!duplicate)
            {
                HoldemHand holdemHand = (HoldemHand)hand;

                Trace.WriteLine("Muck hand available called!");

                // Has this player raised preflop with this hand?
                if (raises[HoldemGamePhase.Preflop].WasIncremented)
                {
                    startingHandsWithPreflopRaise.Add(holdemHand);

                    // Has this player pushed all in preflop with this hand?
                    if (pushedAllIn[HoldemGamePhase.Preflop].WasIncremented)
                    {
                        startingHandsWithPreflopAllIn.Add(holdemHand);
                    }
                }

                // Has this player just limped or called a raise with this hand?
                else if (calls[HoldemGamePhase.Preflop].WasIncremented)
                {
                    startingHandsWithPreflopCall.Add(holdemHand);
                }
            }
        }