public void MoneyManagementShoe_Streaks_TakeProfit_1_Test() { cards = GameBaccaratTest.Prepare1DeckShoe_AllB(); PrepareGame(); MoneyManagementInitialize(); myMoneyManagement.ShoeTakeProfit = 2; myStrategy[0].Streaks_Target = OutcomesBaccaratCoup.B; myStrategy[0].Streaks_Length = 3; myStrategy[0].Streaks_BetPlacement = OutcomesBaccaratCoup.B; myStrategy[0].StrategyBaccaratType = StrategiesBaccaratTypes.Streaks; strategyMultiWrapper.MyStrategy[0] = myStrategy[0]; strategy = strategyMultiWrapper.GetStrategyMultiWrapper(); strategy(game.Results, score, score.TotalScore, mmShoe, mmBankroll); Assert.AreEqual(0, score.UnitPlayerWin); Assert.AreEqual(3, score.UnitBankerWin); Assert.AreEqual(0, score.UnitTieWin); Assert.AreEqual(3, score.UnitWin); Assert.AreEqual((decimal)2.85, score.DollarWin); Assert.AreEqual(0, score.UnitLoss); Assert.AreEqual((decimal)0, score.DollarLoss); Assert.AreEqual(3, score.UnitBet); Assert.AreEqual(3, score.NumberBet); Assert.AreEqual(game.Results[5].TotalDollarScore, score.TotalScore); Assert.AreEqual((decimal)2.85M, score.TotalScore); for (int i = 0; i < 3; i++) { Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[i].OutcomeBet); } Assert.AreEqual(OutcomesLastCoupBet.Win, game.Results[3].OutcomeBet); Assert.AreEqual(OutcomesLastCoupBet.Win, game.Results[4].OutcomeBet); Assert.AreEqual(OutcomesLastCoupBet.Win, game.Results[5].OutcomeBet); for (int i = 6; i < 12; i++) { Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[i].OutcomeBet); } }
public void SessionTest_ProgressionIsNotResetOnNewShoe_Test() { Setup2ShoesBetPAlwaysMartingale(); StrategySimulator.App.StrategizeBaccaratViewModel.IsResetProgressionAfterShoe = false; shoe = new Shoe(GameBaccaratTest.Prepare1DeckShoe_AllB()); session.SetShoe(shoe); session.PlaySession(); Assert.AreEqual(2, session.shoeResults.Count); Assert.AreEqual(2048, session.shoeResults[0][11].CoupBet.UnitBet); Assert.AreEqual(8388608, session.shoeResults[1][11].CoupBet.UnitBet); Assert.AreEqual(-4095M, Convert.ToDecimal(session.ItemsShoe[0].ScoreTotal)); Assert.AreEqual(-16777215, Convert.ToDecimal(session.ItemsShoe[1].ScoreTotal)); }
public void MoneyManagementShoe_Custom_TakeProfit_1_Test() { cards = GameBaccaratTest.Prepare1DeckShoe_AllB(); PrepareGame(); MoneyManagementInitialize(); myStrategy[0].CustomPattern_Pattern = Utilities.ParseBetPlacementString("b"); myStrategy[0].CustomPattern_BetPlacement = OutcomesBaccaratCoup.B; myStrategy[0].StrategyBaccaratType = StrategiesBaccaratTypes.CustomPattern; strategyMultiWrapper.MyStrategy[0] = myStrategy[0]; strategy = strategyMultiWrapper.GetStrategyMultiWrapper(); strategy(game.Results, score, score.TotalScore, mmShoe, mmBankroll); Assert.AreEqual(0, score.UnitPlayerWin); Assert.AreEqual(6, score.UnitBankerWin); Assert.AreEqual(0, score.UnitTieWin); Assert.AreEqual(6, score.UnitWin); Assert.AreEqual((decimal)5.70, score.DollarWin); Assert.AreEqual(0, score.UnitLoss); Assert.AreEqual((decimal)0, score.DollarLoss); Assert.AreEqual(6, score.UnitBet); Assert.AreEqual(6, score.NumberBet); Assert.AreEqual(game.Results[6].TotalDollarScore, score.TotalScore); Assert.AreEqual((decimal)5.70M, score.TotalScore); Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[0].OutcomeBet); for (int i = 1; i < 7; i++) { Assert.AreEqual(OutcomesLastCoupBet.Win, game.Results[i].OutcomeBet); } for (int i = 7; i < 12; i++) { Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[i].OutcomeBet); } }
public void MoneyManagementBankroll_CustomOpposite_Test() { cards = GameBaccaratTest.Prepare1DeckShoe_AllB(); PrepareGame(); MoneyManagementInitialize(); 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(0, score.UnitPlayerWin); Assert.AreEqual(0, score.UnitBankerWin); Assert.AreEqual(0, score.UnitTieWin); Assert.AreEqual(0, score.UnitWin); Assert.AreEqual((decimal)0, score.DollarWin); Assert.AreEqual(5, score.UnitLoss); Assert.AreEqual((decimal)5, score.DollarLoss); Assert.AreEqual(5, score.UnitBet); Assert.AreEqual(5, score.NumberBet); Assert.AreEqual(game.Results[5].TotalDollarScore, score.TotalScore); Assert.AreEqual((decimal) - 5.00M, score.TotalScore); Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[0].OutcomeBet); for (int i = 1; i < 6; i++) { Assert.AreEqual(OutcomesLastCoupBet.Loss, game.Results[i].OutcomeBet); } for (int i = 6; i < 12; i++) { Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[i].OutcomeBet); } }
public void MoneyManagementBankroll_TieAlways_Test() { cards = GameBaccaratTest.Prepare1DeckShoe_AllB(); 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(0, score.UnitTieWin); Assert.AreEqual(0, score.UnitWin); Assert.AreEqual((decimal)0, score.DollarWin); Assert.AreEqual(5, score.UnitLoss); Assert.AreEqual((decimal)5, score.DollarLoss); Assert.AreEqual(5, score.UnitBet); Assert.AreEqual(5, score.NumberBet); Assert.AreEqual(game.Results[4].TotalDollarScore, score.TotalScore); Assert.AreEqual((decimal) - 5.00M, score.TotalScore); for (int i = 0; i < 5; i++) { Assert.AreEqual(OutcomesLastCoupBet.Loss, game.Results[i].OutcomeBet); } for (int i = 5; i < 12; i++) { Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[i].OutcomeBet); } }
public void SessionTest_CustomOppositeLengthsAreSetCorrectly_Test() { shoe = new Shoe(GameBaccaratTest.Prepare1DeckShoe_AllB()); session.SetShoe(shoe); StrategySimulator.App.StrategizeSetNumber = 0; StrategySimulator.App.StrategizeBaccaratViewModel.BetPlacementStrategyOptionPickedIndex = (int)StrategiesBaccaratTypes.Opposite; session.PlaySession(); Assert.AreEqual(1, session.GetCustomOppositeLength(0)); StrategySimulator.App.StrategizeSetNumber = 0; StrategySimulator.App.StrategizeBaccaratViewModel.BetPlacementStrategyOptionPickedIndex = (int)StrategiesBaccaratTypes.OTB4L; session.PlaySession(); Assert.AreEqual(2, session.GetCustomOppositeLength(0)); StrategySimulator.App.StrategizeSetNumber = 0; StrategySimulator.App.StrategizeBaccaratViewModel.CustomOppositeLength = "5"; StrategySimulator.App.StrategizeBaccaratViewModel.BetPlacementStrategyOptionPickedIndex = (int)StrategiesBaccaratTypes.CustomOpposite; session.PlaySession(); Assert.AreEqual(5, session.GetCustomOppositeLength(0)); }
public void MoneyManagementBankrollMulti_AllStrategySets_Test() { cards = GameBaccaratTest.Prepare1DeckShoe_AllB(); PrepareGame(); MoneyManagementInitialize(); // Strategy set 1 myStrategy[0].CustomPattern_Pattern = Utilities.ParseBetPlacementString("bbbb"); myStrategy[0].CustomPattern_BetPlacement = OutcomesBaccaratCoup.P; myStrategy[0].StrategyBaccaratType = StrategiesBaccaratTypes.CustomPattern; strategyMultiWrapper.MyStrategy[0] = myStrategy[0]; // Strategy set 2 myStrategy[1].CustomPattern_Pattern = Utilities.ParseBetPlacementString("bbb"); myStrategy[1].CustomPattern_BetPlacement = OutcomesBaccaratCoup.P; myStrategy[1].StrategyBaccaratType = StrategiesBaccaratTypes.CustomPattern; strategyMultiWrapper.MyStrategy[1] = myStrategy[1]; // Strategy set 3 myStrategy[2].CustomPattern_Pattern = Utilities.ParseBetPlacementString("bb"); myStrategy[2].CustomPattern_BetPlacement = OutcomesBaccaratCoup.P; myStrategy[2].StrategyBaccaratType = StrategiesBaccaratTypes.CustomPattern; strategyMultiWrapper.MyStrategy[2] = myStrategy[2]; // Strategy set 4 myStrategy[3].CustomPattern_Pattern = Utilities.ParseBetPlacementString("b"); 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(0, score.UnitPlayerWin); Assert.AreEqual(0, score.UnitBankerWin); Assert.AreEqual(0, score.UnitTieWin); Assert.AreEqual(0, score.UnitWin); Assert.AreEqual((decimal)0, score.DollarWin); Assert.AreEqual(5, score.UnitLoss); Assert.AreEqual((decimal)5, score.DollarLoss); Assert.AreEqual(5, score.UnitBet); Assert.AreEqual(5, score.NumberBet); Assert.AreEqual(game.Results[5].TotalDollarScore, score.TotalScore); Assert.AreEqual((decimal) - 5.00M, game.Results[5].TotalDollarScore); Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[0].OutcomeBet); for (int i = 1; i < 6; i++) { Assert.AreEqual(OutcomesLastCoupBet.Loss, game.Results[i].OutcomeBet); } for (int i = 6; i < 12; i++) { Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[i].OutcomeBet); } }