Beispiel #1
0
 public BestHand(PreflopHand pf, Hand primary, Hand secondary = null, List <Draw> draws = null)
 {
     this.startingHand = pf;
     this.primary      = primary;
     this.secondary    = secondary;
     this.draws        = draws;
 }
Beispiel #2
0
        public bool hasBestHand(PreflopHand pf, Board b)
        {
            List <Card> availableCards = pf.cards.Concat(b.getCards()).ToList();

            foreach (Card c in this.getCards())
            {
                if (!availableCards.Contains(c))
                {
                    return(false);
                }
            }
            return(true);
        }
Beispiel #3
0
        public HandAnalyzer(PreflopHand pf, Board b, bool toPrint = false, bool checkDraws = false)
        {
            // dependencies
            this.hand           = pf;
            this.board          = b;
            this.availableCards = pf.cards.Concat(b.getCards()).ToList();
            this.deck           = new Deck(new HashSet <Card>(this.availableCards));

            // init class properties
            this.bestHand  = null;
            this.quads     = new HashSet <FourOfAKind>();
            this.trips     = new HashSet <ThreeOfAKind>();
            this.pairs     = new HashSet <Pair>();
            this.flushes   = new HashSet <Flush>();
            this.straights = new HashSet <Straight>();

            // populate class properties (e.g. poker hands)
            this.analyzePairedHands();
            this.analyzeStraights(checkDraws);
            this.analyzeFlushes(checkDraws);

            // create best possible MadeHand from hand collections
            this.calculateBestHand();
        }
Beispiel #4
0
 public Equity(PreflopHand pf)
 {
     this.hand      = pf;
     this.count     = 0;
     this.aggregate = 0;
 }