protected override long[] ParseHandId(List <string> header) { var line = header[0]; var idStr = line.SubstringBetween(6, line.IndexOf(' ', 6)); return(HandID.Parse(idStr)); }
protected override long[] ParseHandId(string[] handLines) { //Game ID: 261402571 2/4 Braunite (Omaha) int endIndex = handLines[1].IndexOf(' ', GameIDStartIndex); var handId = handLines[1].Substring(GameIDStartIndex, endIndex - GameIDStartIndex); return(HandID.Parse(handId)); }
protected override long[] ParseHandId(JObject JSON) { var hand = JSON["history"][0]; var handIDString = hand["handId"].ToString(); var items = handIDString.Split(new string[] { ".hand." }, StringSplitOptions.None); return(HandID.Parse(items)); }
protected override long[] ParseHandId(List <string> header) { // Expect the first line to look like this: // "***** Hand History for Game 13550493674 *****" const int firstDigitIndex = 28;//"***** Hand History for Game ".Length string line = header[0]; string handId = line.SubstringBetween(firstDigitIndex, line.Length - 6); return(HandID.Parse(handId)); }
protected override long[] ParseHandId(string[] handLines) { //***** 888poker Hand History for Game 349736402 ***** int start = GetHandStartIndex(handLines); string line = handLines[start]; int endIndex = line.LastIndexOf(' '); int startIndex = line.LastIndexOf(' ', endIndex - 1); string idString = line.Substring(startIndex, endIndex - startIndex); return(HandID.Parse(idString)); }
protected override long[] ParseHandId(string[] handLines) { // Full Tilt Poker Game #26862468195: Table Adornment (6 max, shallow) - $0.50/$1 - No Limit Hold'em - 16:09:19 ET - 2010/12/31 string line = handLines[0]; int hashIndex = 21; int colonIndex = line.IndexOf(':', hashIndex); string handNumber = line.Substring(hashIndex + 1, colonIndex - hashIndex - 1); return(HandID.Parse(handNumber)); }
protected override long[] ParseHandId(string[] handLines) { foreach (var handLine in handLines) { var match = HandIdRegex.Match(handLine); if (match.Success) { return(HandID.Parse(match.Value, '-')); } } throw new HandIdException(handLines[1], "Couldn't find handid"); }
protected override long[] ParseHandId(string[] handLines) { // Expect the first line to look like this: // "***** Hand History for Game 13550493674 *****" const int firstDigitIndex = 28; //= "***** Hand History for Game ".Length string line = handLines[0]; int lastDigitIndex = line.IndexOf(' ', firstDigitIndex); string handId = handLines[0].Substring(firstDigitIndex, lastDigitIndex - firstDigitIndex); return(HandID.Parse(handId)); }
protected override long[] ParseHandId(string[] handLines) { string line = handLines[0]; // 1st line is: // ***** History for hand R5-244090560-4 ***** char[] startChars = new char[] { 'R', 'T' }; int startIndex = line.IndexOfAny(startChars) + 1; int endIndex = line.IndexOf(' ', startIndex); string handNumber = line.Substring(startIndex, endIndex - startIndex); return(HandID.Parse(handNumber, '-')); }
protected override long[] ParseHandId(string[] handLines) { // Line 1 is: // Winamax Poker - CashGame - HandId: #5276724-697-1382607755 - Holdem no limit (10€/20€) - 2013/10/24 09:42:35 UTC // the full handid is too long. The id contains 3 numbers: #Table-Hand-TotalWinamaxHand // for our purposes it should be enough to either use Table-Hand or TotalWinamaxHand // with regards to our standards for other sites we use Table-Hand as HandID int indexOfHandIdStart = handLines[0].IndexOf('#') + 1; int indexOfHandIdEnd = handLines[0].IndexOf(" - ", indexOfHandIdStart + 9); // this makes sure to skip the first appearance of '-' string handNumber = handLines[0].Substring(indexOfHandIdStart, indexOfHandIdEnd - indexOfHandIdStart); return(HandID.Parse(handNumber, '-')); }
private void ReadGameInfo(HandHistory hand, JSON_gameinfo info) { var game = ParseEnum <GameEnum>(info.game); var limit = ParseEnum <GameLimitEnum>(info.limit); hand.GameDescription.GameType = new GameType(limit, game, info.cap); var currency = ParseEnum <Currency>(info.currency); hand.GameDescription.Limit = Limit.FromSmallBlindBigBlind(info.smallBlind, info.bigBlind, currency, info.ante != 0, info.ante); hand.GameDescription.PokerFormat = ParseEnum <PokerFormat>(info.format); hand.GameDescription.SeatType = SeatType.FromMaxPlayers(info.maxSeats); hand.GameDescription.Site = ParseEnum <SiteName>(info.site); hand.TableName = info.tablename; hand.DateOfHandUtc = GetFromUnixTime(info.date); hand.DealerButtonPosition = info.dealer; hand.HandId = HandID.Parse(info.gameId, '.'); hand.TotalPot = info.totalPot; hand.Rake = info.rake; }
protected override long[] ParseHandId(string[] handLines) { string ID = GetXMLAttributeValue(handLines[0], "ID"); return(HandID.Parse(ID)); }
protected override long[] ParseHandId(string[] handLines) { return(HandID.Parse(HandIdRegex.Match(handLines[0]).Value)); }
protected override long[] ParseHandId(string[] handLines) { string handIdLine = handLines[0]; return(HandID.Parse(GetAttribute(handIdLine, " id=\""))); }