Exemple #1
0
        public void MoneyManagementShoe_CustomOpposite_TakeProfit_Test()
        {
            cards = GameBaccaratTest.Prepare1DeckShoe1();
            PrepareGame();
            MoneyManagementInitialize();
            myMoneyManagement.ShoeTakeProfit = 4;

            myStrategy[0].CustomOpposite_Length = 1; // N=1 : same as normal Repeat for shoes without ties
            myStrategy[0].StrategyBaccaratType  = StrategiesBaccaratTypes.CustomOpposite;
            strategyMultiWrapper.MyStrategy[0]  = myStrategy[0];
            strategy = strategyMultiWrapper.GetStrategyMultiWrapper();
            strategy(game.Results, score, score.TotalScore, mmShoe, mmBankroll);

            Assert.AreEqual(3, score.UnitPlayerWin);
            Assert.AreEqual(3, score.UnitBankerWin);
            Assert.AreEqual(0, score.UnitTieWin);

            Assert.AreEqual(6, score.UnitWin);
            Assert.AreEqual((decimal)5.85, score.DollarWin);

            Assert.AreEqual(1, score.UnitLoss);
            Assert.AreEqual((decimal)1, score.DollarLoss);

            Assert.AreEqual(7, score.UnitBet);
            Assert.AreEqual(7, score.NumberBet);

            Assert.AreEqual(game.Results[7].TotalDollarScore, score.TotalScore);
            Assert.AreEqual((decimal)4.85M, score.TotalScore);

            Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[0].OutcomeBet);
            Assert.AreEqual(OutcomesLastCoupBet.Win, game.Results[1].OutcomeBet);
            Assert.AreEqual(OutcomesLastCoupBet.Loss, game.Results[2].OutcomeBet);

            for (int i = 3; i < 8; i++)
            {
                Assert.AreEqual(OutcomesLastCoupBet.Win, game.Results[i].OutcomeBet);
            }

            Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[8].OutcomeBet);
        }
Exemple #2
0
        public void MoneyManagementBankroll_RepeatLastDecision_Test()
        {
            cards = GameBaccaratTest.Prepare1DeckShoe1();
            PrepareGame();
            MoneyManagementInitialize();

            myStrategy[0].StrategyBaccaratType = StrategiesBaccaratTypes.Repeat;
            strategyMultiWrapper.MyStrategy[0] = myStrategy[0];
            strategy = strategyMultiWrapper.GetStrategyMultiWrapper();

            strategy(game.Results, score, score.TotalScore, mmShoe, mmBankroll);

            Assert.AreEqual(1, score.UnitPlayerWin);
            Assert.AreEqual(0, score.UnitBankerWin);
            Assert.AreEqual(0, score.UnitTieWin);

            Assert.AreEqual(1, score.UnitWin);
            Assert.AreEqual((decimal)1, score.DollarWin);

            Assert.AreEqual(6, score.UnitLoss);
            Assert.AreEqual((decimal)6, score.DollarLoss);

            Assert.AreEqual(7, score.UnitBet);
            Assert.AreEqual(7, score.NumberBet);

            Assert.AreEqual(game.Results[7].TotalDollarScore, score.TotalScore);
            Assert.AreEqual((decimal) - 5.00M, score.TotalScore);

            Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[0].OutcomeBet);
            Assert.AreEqual(OutcomesLastCoupBet.Loss, game.Results[1].OutcomeBet);
            Assert.AreEqual(OutcomesLastCoupBet.Win, game.Results[2].OutcomeBet);

            for (int i = 3; i < 8; i++)
            {
                Assert.AreEqual(OutcomesLastCoupBet.Loss, game.Results[i].OutcomeBet);
            }

            Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[8].OutcomeBet);
        }