Пример #1
0
        public static CalculatorData ComputeProfit(CalculatorData cld)
        {
            cld.profit1 = cld.coeff1 * cld.bet1 - cld.Staf;
            cld.profit2 = cld.coeff2 * cld.bet2 - cld.Staf;

            cld.ForkProfit = (1 / ((1 / cld.coeff1) + (1 / cld.coeff2)) - 1) * 100;


            cld.IsFork = CheckFork(cld.coeff1, cld.coeff2);

            cld.Mean = (cld.profit1 + cld.profit2) / 2;
            return(cld);
        }
Пример #2
0
        //считаем от общей суммы
        public static CalculatorData CalculatorBet(double coeff1, double coeff2, int maxBet)
        {
            int c1 = (int)(coeff2 / (coeff1 + coeff2) * maxBet);
            int c2 = maxBet - c1;

            CalculatorData cld = new CalculatorData();

            cld.bet1   = c1;
            cld.bet2   = c2;
            cld.coeff1 = coeff1;
            cld.coeff2 = coeff2;
            cld.Staf   = maxBet;

            cld = ComputeProfit(cld);
            return(cld);
        }
Пример #3
0
        public static CalculatorData CalculatorBetShoulderOne(double coeff1, double coeff2, int CurrentBet)
        {
            int c1 = (int)(CurrentBet);
            int c2 = (int)((coeff1 * c1) / coeff2);

            CalculatorData cld = new CalculatorData();

            cld.bet1   = c1;
            cld.bet2   = c2;
            cld.coeff1 = coeff1;
            cld.coeff2 = coeff2;
            cld.Staf   = c1 + c2;

            cld = ComputeProfit(cld);
            return(cld);
        }
        public CalculatorData Clone()
        {
            CalculatorData dt = new CalculatorData
            {
                coeff1     = coeff1,
                coeff2     = coeff2,
                bet1       = bet1,
                bet2       = bet2,
                profit1    = profit1,
                profit2    = profit2,
                Mean       = Mean,
                Staf       = Staf,
                ForkProfit = ForkProfit,
                IsFork     = IsFork
            };

            return(dt);
        }