Exemplo n.º 1
0
        public void Defender_has_armies_on_nonsuccessfull_attack()
        {
            var rnd      = new MT19937Generator(14);
            var attacker = Player.P1.Army(10);
            var defender = Player.P2.Army(8);

            var result = Dice.AutoAttack(attacker, defender, rnd);

            Assert.IsFalse(result.IsSuccess);
            Assert.AreEqual(new AttackResult(Player.P1.Army(3), Player.P2.Army(3)), result);
        }
Exemplo n.º 2
0
        public void Defender_is_None_on_successfull_attack()
        {
            var rnd      = new MT19937Generator(17);
            var attacker = Player.P1.Army(10);
            var defender = Player.P2.Army(5);

            var result = Dice.AutoAttack(attacker, defender, rnd);

            Assert.IsTrue(result.IsSuccess);
            Assert.AreEqual(new AttackResult(Player.P1.Army(9), Army.None), result);
        }