Example #1
0
        public void CountHalvesBotTest()
        {
            // realAccount less than zero

            var bot = new HalvesBot();

            PrepareToRealAccountLessZeroTest(bot);
            Assert.AreEqual(1000 - 7, bot.Hands[0].Bet);
            bot.MakeBet(200);
            Assert.AreEqual((int)((1000 - 7) / 4), bot.Hands[0].Bet);

            // realAccount more than zero

            bot = new HalvesBot();
            PrepareToRealAccountMoreZeroTest(bot);
            Assert.AreEqual(4 * (1000 - 7), bot.Hands[0].Bet);
            bot.MakeBet(10);
            Assert.AreEqual((1000 - 7) * 16, bot.Hands[0].Bet);

            // realAccount equals zero

            bot = new HalvesBot();
            PrepareToRealAccountZeroTest(bot);
            Assert.AreEqual(16 * (1000 - 7), bot.Hands[0].Bet);
        }
Example #2
0
        public void CreateTest()
        {
            var bot1 = new PlusMinusBot();

            Assert.AreEqual(PlayerStructure.ShoeState.Calculated, bot1.StateOfShoe);

            var bot2 = new HalvesBot();

            Assert.AreEqual(PlayerStructure.ShoeState.Calculated, bot2.StateOfShoe);
        }