public void DoubleMurderTest()
        {
            var      c1   = new Creature(2, 2);
            var      c2   = new Creature(2, 2);
            CardGame game = new TemporaryCardDamageGame(new[] { c1, c2 });

            Assert.That(game.Combat(0, 1), Is.EqualTo(-1));
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var c1       = new Creature(1, 2);
            var c2       = new Creature(1, 1);
            var game     = new TemporaryCardDamageGame(new[] { c1, c2 });
            var winner   = -1;
            var turn     = 1;
            var maxTurns = 10;

            while (winner < 0 && turn < maxTurns)
            {
                WriteLine($"Turn {turn}");
                winner = game.Combat(0, 1);
                ++turn;
            }

            WriteLine(winner >= 0 ? $"Winner is creature {winner + 1}" : "Draw!");
        }