Пример #1
0
        public void NextGamePreparationTest()
        {
            var bot = new PrimitiveManchetanStrategyBot(exampleStartMoney, exampleStartRate);

            bot.Win();
            Assert.IsTrue(bot.Rate == exampleStartRate * 2);

            bot.Win();
            Assert.IsTrue(bot.Rate == exampleStartRate);

            bot.Lose();
            Assert.IsTrue(bot.Rate == exampleStartRate);
        }
Пример #2
0
        public void BotWinningTest()
        {
            var bot = new PrimitiveManchetanStrategyBot(exampleStartMoney, exampleStartRate);

            bot.Win();
            Assert.IsTrue(bot.Money == exampleStartMoney + exampleStartRate);
            Assert.IsTrue(bot.CountGames == 1);
            Assert.IsTrue(bot.CountWinGames == 1);
            Assert.IsTrue(bot.IsWantNextGame);
        }