Ejemplo n.º 1
0
        public void MoneyManagementShoe_TieAlways_TakeProfit_Test()
        {
            cards = GameBaccaratTest.Prepare1DeckShoe3();
            PrepareGame();
            MoneyManagementInitialize();

            myStrategy[0].StrategyBaccaratType = StrategiesBaccaratTypes.TieAlways;
            strategyMultiWrapper.MyStrategy[0] = myStrategy[0];
            strategy = strategyMultiWrapper.GetStrategyMultiWrapper();
            strategy(game.Results, score, score.TotalScore, mmShoe, mmBankroll);

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

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

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

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

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

            Assert.AreEqual(OutcomesLastCoupBet.Loss, 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 < 12; i++)
            {
                Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[i].OutcomeBet);
            }
        }
Ejemplo n.º 2
0
        public void StrategyMultiTest_FourStrategies_Test()
        {
            cards = GameBaccaratTest.Prepare1DeckShoe3();
            PrepareGame();

            // Strategy set 1
            myStrategy[0].CustomPattern_Pattern      = Utilities.ParseBetPlacementString("bppb");
            myStrategy[0].CustomPattern_BetPlacement = OutcomesBaccaratCoup.P;
            myStrategy[0].StrategyBaccaratType       = StrategiesBaccaratTypes.CustomPattern;
            strategyMultiWrapper.MyStrategy[0]       = myStrategy[0];

            // Strategy set 2
            myStrategy[1].Streaks_Length       = 3;
            myStrategy[1].Streaks_Target       = OutcomesBaccaratCoup.B;
            myStrategy[1].Streaks_BetPlacement = OutcomesBaccaratCoup.P;
            myStrategy[1].StrategyBaccaratType = StrategiesBaccaratTypes.Streaks;
            strategyMultiWrapper.MyStrategy[1] = myStrategy[1];

            // Strategy set 3
            myStrategy[2].CustomPattern_Pattern      = Utilities.ParseBetPlacementString("bb");
            myStrategy[2].CustomPattern_BetPlacement = OutcomesBaccaratCoup.B;
            myStrategy[2].StrategyBaccaratType       = StrategiesBaccaratTypes.CustomPattern;
            strategyMultiWrapper.MyStrategy[2]       = myStrategy[2];

            // Strategy set 4
            myStrategy[3].CustomPattern_Pattern      = Utilities.ParseBetPlacementString("p");
            myStrategy[3].CustomPattern_BetPlacement = OutcomesBaccaratCoup.P;
            myStrategy[3].StrategyBaccaratType       = StrategiesBaccaratTypes.CustomPattern;
            strategyMultiWrapper.MyStrategy[3]       = myStrategy[3];

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

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

            Assert.AreEqual(3, score.UnitWin);
            Assert.AreEqual((decimal)2.95M, score.DollarWin);

            Assert.AreEqual(2, score.UnitLoss);
            Assert.AreEqual((decimal)2.00M, score.DollarLoss);

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

            Assert.AreEqual(game.Results[11].TotalDollarScore, score.TotalScore);
            Assert.AreEqual(0.95M, game.Results[11].TotalDollarScore);

            Assert.AreEqual(OutcomesBaccaratCoup.None, game.Results[0].CoupBet.BetPlacement);
            Assert.AreEqual(OutcomesBaccaratCoup.P, game.Results[1].CoupBet.BetPlacement);
            Assert.AreEqual(OutcomesBaccaratCoup.None, game.Results[2].CoupBet.BetPlacement);
            Assert.AreEqual(OutcomesBaccaratCoup.None, game.Results[3].CoupBet.BetPlacement);
            Assert.AreEqual(OutcomesBaccaratCoup.None, game.Results[4].CoupBet.BetPlacement);
            Assert.AreEqual(OutcomesBaccaratCoup.None, game.Results[5].CoupBet.BetPlacement);
            Assert.AreEqual(OutcomesBaccaratCoup.None, game.Results[6].CoupBet.BetPlacement);
            Assert.AreEqual(OutcomesBaccaratCoup.B, game.Results[7].CoupBet.BetPlacement);
            Assert.AreEqual(OutcomesBaccaratCoup.P, game.Results[8].CoupBet.BetPlacement);
            Assert.AreEqual(OutcomesBaccaratCoup.P, game.Results[9].CoupBet.BetPlacement);
            Assert.AreEqual(OutcomesBaccaratCoup.P, game.Results[10].CoupBet.BetPlacement);
            Assert.AreEqual(OutcomesBaccaratCoup.P, game.Results[11].CoupBet.BetPlacement);
        }