Esempio n. 1
0
 private static void Test2()
 {
     var battle = new TurnBattle<IActor>()
     {
         Actors = new Actor[]
         {
             new Actor("A", 10),
             new Actor("B", 12),
         },
         TurnRule = new SimpleTurnRule(),
     };
     battle.Run();
 }
Esempio n. 2
0
        private static void Test1()
        {
            var battle = new TurnBattle <IActorHavingSpeed>()
            {
                Actors = new ActorHavingSpeed[]
                {
                    new ActorHavingSpeed("A", 10, 2),
                    new ActorHavingSpeed("B", 12, 4),
                },
                TurnRule = new TurnRuleSpeedProvideTurn(),
            };

            battle.Run();
        }
Esempio n. 3
0
        private static void Test2()
        {
            var battle = new TurnBattle <IActor>()
            {
                Actors = new Actor[]
                {
                    new Actor("A", 10),
                    new Actor("B", 12),
                },
                TurnRule = new SimpleTurnRule(),
            };

            battle.Run();
        }
Esempio n. 4
0
        private static void Test1()
        {
            var battle = new TurnBattle<IActorHavingSpeed>()
            {
                Actors = new ActorHavingSpeed[]
                {
                    new ActorHavingSpeed("A", 10, 2),
                    new ActorHavingSpeed("B", 12, 4),
                },
                TurnRule = new TurnRuleSpeedProvideTurn(),
            };

            battle.Run();
        }
Esempio n. 5
0
        static void Main(string[] args)
        {
            ICommand[] commands = new ICommand[]
            {
                new HealCommand(),
                new DamageCommand(),
            };

            var battle = new TurnBattle<IActor>()
            {
                Actors = new IActor[]
                {
                    new CommandActor("A", 10, commands),
                    new Actor("B", 15),
                },
                TurnRule = new SimpleTurnRule(),
            };
            battle.Run();
        }
Esempio n. 6
0
        static void Main(string[] args)
        {
            ICommand[] commands = new ICommand[]
            {
                new HealCommand(),
                new DamageCommand(),
            };

            var battle = new TurnBattle <IActor>()
            {
                Actors = new IActor[]
                {
                    new CommandActor("A", 10, commands),
                    new Actor("B", 15),
                },
                TurnRule = new SimpleTurnRule(),
            };

            battle.Run();
        }