コード例 #1
0
 public static string GetDisplayName(PokerFormat pokerFormat)
 {
     switch (pokerFormat)
     {
         case PokerFormat.CashGame:
             return "Cash Game";
         default:
             return pokerFormat.ToString();
     }
 }
        private string GetHandText(PokerFormat pokerFormat, SiteName siteName, string subFolderName, string textFileName)
        {
            string subFolder = System.IO.Path.Combine(GetSampleHandHistoryFolder(pokerFormat, siteName), subFolderName);
            string path = System.IO.Path.Combine(subFolder, textFileName) + ".txt";

            if (_fileReader.FileExists(path) == false)
            {
                return null;
            }

            return _fileReader.ReadAllText(path);
        }
コード例 #3
0
 public GameDescriptor(PokerFormat pokerFormat,
                       SiteName siteName,
                       GameType gameType,
                       Buyin buyin,
                       TableType tableType,
                       SeatType seatType)
 {
     PokerFormat = pokerFormat;
     Site = siteName;
     GameType = gameType;
     Buyin = buyin;
     TableType = tableType;
     SeatType = seatType;
 }
コード例 #4
0
 public GameDescriptor(PokerFormat pokerFormat,
                       SiteName siteName,
                       GameType gameType,
                       Limit limit,
                       TableType tableType,
                       SeatType seatType)
 {
     PokerFormat = pokerFormat;
     Site = siteName;
     GameType = gameType;
     Limit = limit;
     TableType = tableType;
     SeatType = seatType;
 }
 public string GetCancelledHandHandHistoryText(PokerFormat pokerFormat, SiteName siteName)
 {
     return GetHandText(pokerFormat, siteName, "ValidHandTests", "CancelledHand");
 }
 public string GetGameTypeHandHistoryText(PokerFormat pokerFormat, SiteName siteName, GameType gameType)
 {
     return GetHandText(pokerFormat, siteName, "GameTypeTests", gameType.ToString());
 }
 public string GetCommunityCardsHandHistoryText(PokerFormat pokerFormat, SiteName siteName, Street street, int testNumber)
 {
     return(GetHandText(pokerFormat, siteName, "StreetTests", street.ToString() + (testNumber == 1 ? "" : testNumber.ToString())));
 }
 public string GetFormatHandHistoryText(PokerFormat pokerFormat, SiteName siteName, string name)
 {
     return(GetHandText(pokerFormat, siteName, "FormatTests", name));
 }
 public string GetTableExampleHandHistoryText(PokerFormat pokerFormat, SiteName siteName, int tableTestNumber)
 {
     return(GetHandText(pokerFormat, siteName, "Tables", "Table" + tableTestNumber));
 }
 public string GetSeatExampleHandHistoryText(PokerFormat pokerFormat, SiteName siteName, SeatType seatType)
 {
     return(GetHandText(pokerFormat, siteName, "Seats", seatType.ToString()));
 }
コード例 #11
0
 public HandParserGameTypeTests(PokerFormat format, string site) : base(site)
 {
     this.format = format;
 }
 public string GetTableExampleHandHistoryText(PokerFormat pokerFormat, SiteName siteName, int tableTestNumber)
 {
     return GetHandText(pokerFormat, siteName, "Tables", "Table" + tableTestNumber);
 }
 public string GetSeatExampleHandHistoryText(PokerFormat pokerFormat, SiteName siteName, SeatType seatType)
 {
     return GetHandText(pokerFormat, siteName, "Seats", seatType.ToString());
 }
 public string GetMultipleHandExampleText(PokerFormat pokerFormat, SiteName siteName, int handCount)
 {
     return GetHandText(pokerFormat, siteName, "MultipleHandsTests", handCount + "MultipleHands");
 }
 public string GetLimitExampleHandHistoryText(PokerFormat pokerFormat, SiteName siteName, string fileName)
 {
     return GetHandText(pokerFormat, siteName, "Limits", fileName);
 }
 public string GetHandExample(PokerFormat pokerFormat, SiteName siteName, string subFolder, string fileName)
 {
     return GetHandText(pokerFormat, siteName, subFolder, fileName);
 }
 public string GetGeneralHandHistoryText(PokerFormat pokerFormat, SiteName siteName, string testName)
 {
     return GetHandText(pokerFormat, siteName, "GeneralHands", testName);
 }
 public string GetValidHandHandHistoryText(PokerFormat pokerFormat, SiteName siteName, bool isValid)
 {
     return(GetHandText(pokerFormat, siteName, "ValidHandTests", (isValid) ? "ValidHand" : "InvalidHand"));
 }
 public string GetCommunityCardsHandHistoryText(PokerFormat pokerFormat, SiteName siteName, Street street)
 {
     return(GetHandText(pokerFormat, siteName, "StreetTests", street.ToString()));
 }
 public string GetValidHandHandHistoryText(PokerFormat pokerFormat, SiteName siteName, bool isValid)
 {
     return GetHandText(pokerFormat, siteName, "ValidHandTests", (isValid) ? "ValidHand" : "InvalidHand");
 }
 public string GetValidHandHandHistoryText(PokerFormat pokerFormat, SiteName siteName, bool isValid, int testNumber)
 {
     return(GetHandText(pokerFormat, siteName, "ValidHandTests", (isValid ? "ValidHand" : "InvalidHand") + "_" + testNumber));
 }
 public string GetCommunityCardsHandHistoryText(PokerFormat pokerFormat, SiteName siteName, Street street)
 {
     return GetHandText(pokerFormat, siteName, "StreetTests", street.ToString());
 }
 public string GetBuyinExampleHandHistoryText(PokerFormat pokerFormat, SiteName siteName, string fileName)
 {
     return(GetHandText(pokerFormat, siteName, "Buyins", fileName));
 }
 private string GetSampleHandHistoryFolder(PokerFormat pokerFormat, SiteName siteName)
 {
     return string.Format(@"SampleHandHistories\{0}\{1}\", siteName, pokerFormat);
 }
 public string GetGeneralHandHistoryText(PokerFormat pokerFormat, SiteName siteName, string testName)
 {
     return(GetHandText(pokerFormat, siteName, "GeneralHands", testName));
 }
 public string GetHandExample(PokerFormat pokerFormat, SiteName siteName, string subFolder, string fileName)
 {
     return(GetHandText(pokerFormat, siteName, subFolder, fileName));
 }
 public string GetGameTypeHandHistoryText(PokerFormat pokerFormat, SiteName siteName, GameType gameType)
 {
     return(GetHandText(pokerFormat, siteName, "GameTypeTests", gameType.ToString()));
 }
コード例 #28
0
 public string GetCancelledHandHandHistoryText(PokerFormat pokerFormat, SiteName siteName)
 {
     return(GetHandText(pokerFormat, siteName, "ValidHandTests", "CancelledHand"));
 }
 public string GetMultipleHandExampleText(PokerFormat pokerFormat, SiteName siteName, int handCount)
 {
     return(GetHandText(pokerFormat, siteName, "MultipleHandsTests", handCount + "MultipleHands"));
 }
 public string GetFormatHandHistoryText(PokerFormat pokerFormat, SiteName siteName, string name)
 {
     return GetHandText(pokerFormat, siteName, "FormatTests", name);
 }
 private string GetSampleHandHistoryFolder(PokerFormat pokerFormat, SiteName siteName)
 {
     return(string.Format(@"SampleHandHistories\{0}\{1}\", siteName, pokerFormat));
 }
コード例 #32
0
 public TournamentBuyinTests(PokerFormat format, string site, string[] expectedBuyins)
     : base(site)
 {
     _expectedBuyins = expectedBuyins;
     this.format     = format;
 }
コード例 #33
0
        public void PokerFormatIsParsedTest(string handHistoryFile, PokerFormat pokerFormat)
        {
            var handHistory = ParseHandHistory(handHistoryFile);

            Assert.That(handHistory.GameDescription.PokerFormat, Is.EqualTo(pokerFormat));
        }
コード例 #34
0
 public HandParserLimitTests(PokerFormat format, string site, params string[] expectedLimits)
     : base(site)
 {
     _expectedLimits = expectedLimits;
     this.format     = format;
 }