public void SessionTest_FollowBetPlacementIsResetOnNewShoe_Test() { StrategySimulator.App.GameBaccaratViewModel.NShoesInt = 2; StrategySimulator.App.StrategizeBaccaratViewModel.FollowLengthInt = 2; StrategySimulator.App.StrategizeBaccaratViewModel.BetPlacementStrategyOptionPickedIndex = (int)StrategiesBaccaratTypes.Follow; StrategySimulator.App.StrategizeBaccaratViewModel.BetProgressionOptionPickedIndex = (int)BetProgressionTypes.Martingale; StrategySimulator.App.StrategizeBaccaratViewModel.IsResetProgressionAfterShoe = true; StrategySimulator.App.GameBaccaratViewModel.IsShuffle = false; StrategySimulator.App.GameBaccaratViewModel.IsBurn = false; StrategySimulator.App.GameBaccaratViewModel.IsNewCards = false; shoe = new Shoe(GameBaccaratTest.Prepare1DeckShoe5()); session.SetShoe(shoe); session.PlaySession(); Assert.AreEqual(2, session.shoeResults.Count); Assert.AreEqual(4, session.shoeResults[0][11].CoupBet.UnitBet); Assert.AreEqual(4, session.shoeResults[1][11].CoupBet.UnitBet); Assert.AreEqual(-5M, Convert.ToDecimal(session.ItemsShoe[0].ScoreTotal)); Assert.AreEqual(-10M, Convert.ToDecimal(session.ItemsShoe[1].ScoreTotal)); // note that this would be -8 if Follow_BetPlacement were not reset to none at top of new shoe }
public void StrategyMultiTest_ThreeStrategies_Test() { cards = GameBaccaratTest.Prepare1DeckShoe5(); PrepareGame(); // Strategy set 1 myStrategy[0].CustomPattern_Pattern = Utilities.ParseBetPlacementString("btbp"); myStrategy[0].CustomPattern_BetPlacement = OutcomesBaccaratCoup.P; myStrategy[0].StrategyBaccaratType = StrategiesBaccaratTypes.CustomPattern; strategyMultiWrapper.MyStrategy[0] = myStrategy[0]; // Strategy set 2 myStrategy[1].Streaks_Length = 2; myStrategy[1].Streaks_Target = OutcomesBaccaratCoup.P; myStrategy[1].Streaks_BetPlacement = OutcomesBaccaratCoup.B; myStrategy[1].StrategyBaccaratType = StrategiesBaccaratTypes.Streaks; strategyMultiWrapper.MyStrategy[1] = myStrategy[1]; // Strategy set 3 myStrategy[2].CustomPattern_Pattern = Utilities.ParseBetPlacementString("b"); myStrategy[2].CustomPattern_BetPlacement = OutcomesBaccaratCoup.B; myStrategy[2].StrategyBaccaratType = StrategiesBaccaratTypes.CustomPattern; strategyMultiWrapper.MyStrategy[2] = myStrategy[2]; strategy = strategyMultiWrapper.GetStrategyMultiWrapper(); strategy(game.Results, score, score.TotalScore, mmShoe, mmBankroll); Assert.AreEqual(1, score.UnitPlayerWin); Assert.AreEqual(3, score.UnitBankerWin); Assert.AreEqual(0, score.UnitTieWin); Assert.AreEqual(4, score.UnitWin); Assert.AreEqual((decimal)3.85M, score.DollarWin); Assert.AreEqual(2, score.UnitLoss); Assert.AreEqual((decimal)2.00M, score.DollarLoss); Assert.AreEqual(6, score.UnitBet); Assert.AreEqual(6, score.NumberBet); Assert.AreEqual(game.Results[11].TotalDollarScore, score.TotalScore); Assert.AreEqual(1.85M, game.Results[11].TotalDollarScore); Assert.AreEqual(OutcomesBaccaratCoup.None, game.Results[0].CoupBet.BetPlacement); Assert.AreEqual(OutcomesBaccaratCoup.B, game.Results[1].CoupBet.BetPlacement); Assert.AreEqual(OutcomesBaccaratCoup.None, game.Results[2].CoupBet.BetPlacement); Assert.AreEqual(OutcomesBaccaratCoup.B, game.Results[3].CoupBet.BetPlacement); Assert.AreEqual(OutcomesBaccaratCoup.P, game.Results[4].CoupBet.BetPlacement); Assert.AreEqual(OutcomesBaccaratCoup.B, game.Results[5].CoupBet.BetPlacement); Assert.AreEqual(OutcomesBaccaratCoup.B, game.Results[6].CoupBet.BetPlacement); Assert.AreEqual(OutcomesBaccaratCoup.None, game.Results[7].CoupBet.BetPlacement); Assert.AreEqual(OutcomesBaccaratCoup.B, game.Results[8].CoupBet.BetPlacement); Assert.AreEqual(OutcomesBaccaratCoup.B, game.Results[9].CoupBet.BetPlacement); Assert.AreEqual(OutcomesBaccaratCoup.None, game.Results[10].CoupBet.BetPlacement); Assert.AreEqual(OutcomesBaccaratCoup.B, game.Results[11].CoupBet.BetPlacement); }
public void MoneyManagementShoe_Custom_StopLoss_2_Test() { cards = GameBaccaratTest.Prepare1DeckShoe5(); PrepareGame(); MoneyManagementInitialize(); myMoneyManagement.ShoeStopLoss = 2; 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(0, score.UnitBankerWin); Assert.AreEqual(0, score.UnitTieWin); Assert.AreEqual(0, score.UnitWin); Assert.AreEqual((decimal)0.00, score.DollarWin); Assert.AreEqual(2, score.UnitLoss); Assert.AreEqual((decimal)2, score.DollarLoss); Assert.AreEqual(2, score.UnitBet); Assert.AreEqual(2, score.NumberBet); Assert.AreEqual(game.Results[6].TotalDollarScore, score.TotalScore); Assert.AreEqual((decimal) - 2.00M, score.TotalScore); Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[0].OutcomeBet); Assert.AreEqual(OutcomesLastCoupBet.Push, game.Results[1].OutcomeBet); Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[2].OutcomeBet); Assert.AreEqual(OutcomesLastCoupBet.Loss, game.Results[3].OutcomeBet); Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[4].OutcomeBet); Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[5].OutcomeBet); Assert.AreEqual(OutcomesLastCoupBet.Loss, game.Results[6].OutcomeBet); for (int i = 7; i < 12; i++) { Assert.AreEqual(OutcomesLastCoupBet.None, game.Results[i].OutcomeBet); } }