示例#1
0
        private void addRule(int hash, Rule rule)
        {
            // hash
            if (!rules.ContainsKey(hash))
            {
                rules.Add(hash, new MaxBetDictionary());
            }

            // bet
            MaxBetDictionary maxBetDict = rules[hash];
            MaxBet           maxBet     = new MaxBet(rule.MinMaxBet, rule.MaxMaxBet);

            if (!maxBetDict.ContainsKey(maxBet))
            {
                maxBetDict.Add(maxBet, new PotSizeDictionary());
            }

            // pot
            PotSizeDictionary potSizeDict = maxBetDict[maxBet];
            PotSize           potSize     = new PotSize(rule.MinPotSize, rule.MaxPotSize);

            if (!potSizeDict.ContainsKey(potSize))
            {
                potSizeDict.Add(potSize, rule);
            }
        }
示例#2
0
 public bool Validate()
 {
     return(StartBet.GetValueOrDefault() > 0 &&
            MaxBet.GetValueOrDefault() > 0 &&
            WinPercent.GetValueOrDefault() > 0 &&
            Factor.GetValueOrDefault() > 0 &&
            (!CanChangeWinPercent || ChangeWinPercent.GetValueOrDefault() > 0));
 }