public UnderOverBet(IMatch match, IBetLine line, string mark, decimal amount, decimal coefficient, ITipster tipster) : base(match, line, mark, amount, coefficient, tipster) { this.CurrentBetType = BetType.UnderOver; }
public BetForFinalResult(IMatch match, IBetLine line, string mark, decimal amount, decimal coefficient, ITipster tipster) : base(match, line, mark.ToString(), amount, coefficient, tipster) { this.ResultType = ResultType.Final; }
public void AddTipster(int tipsterId, ITipster tipster) { this.tipsters.Add(tipsterId, tipster); }
public Bet(IMatch match, IBetLine line, string mark, decimal amount, decimal coefficient, ITipster tipster) { if (match == null) { throw new ArgumentNullException(string.Format(EngineConstants.ObjectCannotBeNullErrorMessage, "Match")); } if (line == null) { throw new ArgumentNullException(string.Format(EngineConstants.ObjectCannotBeNullErrorMessage, "Line")); } if (tipster == null) { throw new ArgumentNullException(string.Format(EngineConstants.ObjectCannotBeNullErrorMessage, "Tipster")); } this.Line = line; this.Match = match; this.Amount = amount; this.Coefficient = coefficient; this.CurrentBetType = currentBetType; this.Mark = mark; this.isChecked = false; this.Tipster = tipster; if (this.Match.Results != null && this.Match.Results.ContainsKey(resultType)) { throw new ArgumentException(EngineConstants.CannotAddBetToMatchWithResultErrorMessage); } if (this.Line.HasCompleteBet) { throw new ArgumentException(EngineConstants.AlreadyCompletedLineErrorMessage); } if (this.CalculateWinningBetAmount() > (this.Line.LeftValueToBeBet() + 0.3m)) { throw new ArgumentException(EngineConstants.BetIsGreaterThenNeededErrorMessage); } this.Line.HasCompleteBet = this.IsReadyToBeComplete(); match.AddBet(this); line.AddBet(this); }
public DoubleSignBet(IMatch match, IBetLine line, string mark, decimal amount, decimal coefficient, ITipster tipster) : base(match, line, mark, amount, coefficient, tipster) { this.CurrentBetType = BetType.DoubleSign; }