public GameDescriptor() : this(PokerFormat.Unknown,
                                SiteName.Unknown,
                                GameType.Unknown,
                                Limit.AllLimit(),
                                TableType.FromTableTypeDescriptions(),
                                SeatType.AllSeatType())
 {
 }
Exemplo n.º 2
0
        public static Limit ParseDbSafeString(string limitString)
        {
            if (limitString == "Any")
            {
                return(Limit.AllLimit());
            }

            string[] split = limitString.Replace("Ante", "").Replace("L", "").Replace("c", "").Split('-');

            decimal smallBlind = Int32.Parse(split[0]) / 100.0m;
            decimal bigBlind   = Int32.Parse(split[1]) / 100.0m;

            decimal ante = (split.Length == 4) ? Int32.Parse(split[2]) / 100.0m : 0;

            string   currencyString = (split.Length == 4) ? split[3] : split[2];
            Currency currency       = (Currency)Enum.Parse(typeof(Currency), currencyString);

            return(Limit.FromSmallBlindBigBlind(smallBlind, bigBlind, currency, ante != 0, ante));
        }