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); } }
public bool Validate() { return(StartBet.GetValueOrDefault() > 0 && MaxBet.GetValueOrDefault() > 0 && WinPercent.GetValueOrDefault() > 0 && Factor.GetValueOrDefault() > 0 && (!CanChangeWinPercent || ChangeWinPercent.GetValueOrDefault() > 0)); }