コード例 #1
0
ファイル: Fork.cs プロジェクト: Doktorishka/ForksEvo
        public void ReplaceBet(AnotherBet anotherBet)
        {
            Bet normalBet = this.ConvertToNormalBet(anotherBet);

            if (anotherBet.AnotherBetNumber == EAnotherBetNumber.One)
            {
                normalBet.BetType = this.OneBet.BetType;
                this.K1           = anotherBet.K;
                this.OneBet       = normalBet;
            }
            else
            {
                normalBet.BetType = this.TwoBet.BetType;
                this.K2           = anotherBet.K;
                this.TwoBet       = normalBet;
            }
            ++this.Id;
        }
コード例 #2
0
ファイル: Fork.cs プロジェクト: Doktorishka/ForksEvo
        private Bet ConvertToNormalBet(AnotherBet bet)
        {
            Bet bet1 = new Bet()
            {
                Coef       = bet.Coef,
                Bookmaker  = bet.Bookmaker,
                EvId       = bet.EvId,
                OtherData  = bet.OtherData,
                BetValue   = bet.BetValue,
                Direction  = bet.Direction,
                ForksCount = 0,
                MatchData  = " (" + bet.League + ") " + bet.GetClearScore()
            };

            bet1.Direction = bet.Direction;
            bet1.Parametr  = bet.Parametr;
            bet1.Team      = bet.Teams;
            bet1.Url       = bet.Url;
            return(bet1);
        }