public RiskType Check(UnsettledBet bet, Dictionary<int ,SettledBetReport> history)
 {
     if (bet.ToWin >= _threshold)
     {
         return RiskType.BigBet;
     }
     return RiskType.None;
 }
 public RiskType Check(UnsettledBet bet, Dictionary<int, SettledBetReport> history)
 {
     if (history.ContainsKey(bet.CustomerId) && history[bet.CustomerId].IsUnusual)
     {
         return RiskType.Risky;
     }
     return RiskType.None;
 }
Exemplo n.º 3
0
 public RiskyBet(UnsettledBet bet)
 {
     CustomerId = bet.CustomerId;
     Event = bet.Event;
     Participant = bet.Participant;
     Stake = bet.Stake;
     ToWin = bet.ToWin;
     RiskTypes = new List<RiskType>();
 }
Exemplo n.º 4
0
 public RiskyBet(UnsettledBet bet)
 {
     CustomerId  = bet.CustomerId;
     Event       = bet.Event;
     Participant = bet.Participant;
     Stake       = bet.Stake;
     ToWin       = bet.ToWin;
     RiskTypes   = new List <RiskType>();
 }
        public RiskType Check(UnsettledBet bet, Dictionary<int, SettledBetReport> history)
        {
            if (history.ContainsKey(bet.CustomerId))
            {
                var stake = history[bet.CustomerId].AvgStake;

                if (bet.Stake > HighlyUnusualRate * stake)
                    return RiskType.HighlyUnusual;

                if (bet.Stake > UnusualRate * stake)
                    return RiskType.Unusual;
            }
            return RiskType.None;
        }