コード例 #1
0
ファイル: PickConverter.cs プロジェクト: rvnlord/BettingBot
 public static string PickChoiceToString(PickChoice choice)
 {
     if (choice == PickChoice.Home)
     {
         return("H");
     }
     if (choice == PickChoice.Draw)
     {
         return("D");
     }
     if (choice == PickChoice.Away)
     {
         return("A");
     }
     if (choice == PickChoice.HomeOrDraw)
     {
         return("H D");
     }
     if (choice == PickChoice.HomeOrAway)
     {
         return("H A");
     }
     if (choice == PickChoice.DrawOrAway)
     {
         return("D A");
     }
     if (choice == PickChoice.Over)
     {
         return("Over");
     }
     if (choice == PickChoice.Under)
     {
         return("Under");
     }
     if (choice == PickChoice.HomeAsianHandicapAdd)
     {
         return("H +");
     }
     if (choice == PickChoice.AwayAsianHandicapAdd)
     {
         return("A +");
     }
     if (choice == PickChoice.HomeAsianHandicapSubtract)
     {
         return("H -");
     }
     if (choice == PickChoice.AwayAsianHandicapSubtract)
     {
         return("A -");
     }
     if (choice == PickChoice.BothToScore)
     {
         return("BTTS");
     }
     if (choice == PickChoice.Other)
     {
         return("(Inny)");
     }
     return("(Nieobsługiwany typ)");
 }
コード例 #2
0
ファイル: BetRequest.cs プロジェクト: rvnlord/BettingBot
 public override int GetHashCode()
 {
     return(Date.GetHashCode() ^ 7
            * Discipline.GetHashCode() ^ 11
            * LeagueName.GetHashCode() ^ 17
            * MatchHomeName.GetHashCode() ^ 19
            * MatchAwayName.GetHashCode() ^ 23
            * PickChoice.GetHashCode() ^ 29
            * PickValue.GetHashCode() ^ 31);
 }
コード例 #3
0
ファイル: PickConverter.cs プロジェクト: rvnlord/BettingBot
        public static string PickToString(PickChoice choice, double?value)
        {
            var sb = new StringBuilder();

            sb.Append(PickChoiceToString(choice));

            if (choice == PickChoice.BothToScore)
            {
                sb.Append(value.ToBool() ? " - Y" : " - N");
            }
            else if (value != null)
            {
                if (!sb.ToString().EndsWithAny(ArrayUtils.Operators))
                {
                    sb.Append(" ");
                }
                sb.Append($"{value}");
            }


            return(sb.ToString());
        }
コード例 #4
0
 public override string ToString()
 {
     return($"[{Date.Rfc1123:dd-MM-yyyy HH:mm}] {MatchHomeName} - {MatchAwayName}: {PickChoice.EnumToString()} {PickValue:0.##} (s: {Stake:0.00})");
 }
コード例 #5
0
ファイル: PickResponse.cs プロジェクト: rvnlord/BettingBot
 public PickResponse(string pickOriginalString, PickChoice choice, double?value)
 {
     PickOriginalString = pickOriginalString;
     Choice             = choice;
     Value = value;
 }
コード例 #6
0
 public DbPick(int id, PickChoice choice, double?value)
 {
     Id     = id;
     Choice = choice;
     Value  = value;
 }