public void TableDescriptionIsParsedTest(string handHistoryFile, TableTypeDescription tableDescription) { var parser = new Poker888FastParserImpl(); string rawHands = File.ReadAllText(handHistoryFile); var hands = parser.SplitUpMultipleHands(rawHands).ToArray(); var succeded = 0; var total = hands.Count(); for (int i = 0; i < total; i++) { HandHistory hand = parser.ParseFullHandHistory(hands[i], true); var tableTypeDescription = hand.GameDescription.TableType.FirstOrDefault(); if (tableTypeDescription == tableDescription) { succeded++; } } Assert.AreEqual(total, succeded); Debug.WriteLine("Processed hands: {0}/{1}", succeded, total); }
public void TableDescriptionIsParsedTest(string handHistoryFile, TableTypeDescription tableDescription) { var handHistory = ParseHandHistory(handHistoryFile); var tableTypeDescription = handHistory.GameDescription.TableType.FirstOrDefault(); Assert.That(tableTypeDescription, Is.EqualTo(tableDescription)); }
public CashTableKey(decimal bigBlind, TableTypeDescription tableTypeDescription, GameType gameType, int seats, decimal buyin) { BigBlind = bigBlind; TableTypeDescription = tableTypeDescription; GameType = gameType; Seats = seats; Buyin = buyin; }
public override int GetHashCode() { unchecked { var hashcode = 23; hashcode = (hashcode * 31) + BigBlind.GetHashCode(); hashcode = (hashcode * 31) + GameType.GetHashCode(); hashcode = (hashcode * 31) + TableTypeDescription.GetHashCode(); hashcode = (hashcode * 31) + Seats.GetHashCode(); hashcode = (hashcode * 31) + Buyin.GetHashCode(); return(hashcode); } }
public static string GetDisplayString(TableTypeDescription tableType) { switch (tableType) { case TableTypeDescription.P2: return("2 Players"); case TableTypeDescription.P4: return("4 Players"); case TableTypeDescription.P12: return("12 Players"); case TableTypeDescription.P16: return("16 Players"); case TableTypeDescription.P18: return("18 Players"); case TableTypeDescription.P27: return("27 Players"); case TableTypeDescription.P32: return("32 Players"); case TableTypeDescription.P45: return("45 Players"); case TableTypeDescription.P90: return("90 Players"); case TableTypeDescription.P180: return("180 Players"); case TableTypeDescription.P240: return("240 Players"); case TableTypeDescription.P360: return("360 Players"); case TableTypeDescription.P990: return("990 Players"); case TableTypeDescription.HyperTurbo: return("HyperTurbo"); default: return(tableType.ToString()); } }
public Table(string serverName, string databaseName, string schemaName, string tableName, TableTypeDescription tableTypeDescription, DateTime modificationDateTime, string multiPartIdentifier, IReadOnlyCollection <IColumn> columns) { Identifier = Identifier.Table; ServerName = serverName; DatabaseName = databaseName; SchemaName = schemaName; TableName = tableName; TableTypeDescription = tableTypeDescription; ModificationDateTime = modificationDateTime; MultiPartIdentifier = multiPartIdentifier; Columns = columns; foreach (var column in columns) { column.SetParent(this); } }
public static string GetDisplayString(TableTypeDescription tableType) { switch (tableType) { case TableTypeDescription.P2: return "2 Players"; case TableTypeDescription.P4: return "4 Players"; case TableTypeDescription.P12: return "12 Players"; case TableTypeDescription.P16: return "16 Players"; case TableTypeDescription.P18: return "18 Players"; case TableTypeDescription.P27: return "27 Players"; case TableTypeDescription.P32: return "32 Players"; case TableTypeDescription.P45: return "45 Players"; case TableTypeDescription.P90: return "90 Players"; case TableTypeDescription.P180: return "180 Players"; case TableTypeDescription.P240: return "240 Players"; case TableTypeDescription.P360: return "360 Players"; case TableTypeDescription.P990: return "990 Players"; case TableTypeDescription.HyperTurbo: return "HyperTurbo"; default: return tableType.ToString(); } }
public static CashTableKey From(decimal bigBlind, decimal buyin, TableTypeDescription tableTypeDescription, GameType gameType, int seats) { return(new CashTableKey(bigBlind, tableTypeDescription, gameType, seats, buyin)); }
public void TableDescriptionIsParsedTest(string handHistoryFile, TableTypeDescription tableDescription) { var handHistory = ParseHandHistory(handHistoryFile); Assert.IsTrue(handHistory.GameDescription.TableType.Contains(tableDescription)); }