Example #1
0
        static void Run(HeroFactory heroFactory)
        {
            var hero = new Hero(heroFactory);

            hero.Run();
            hero.Hit();
        }
Example #2
0
 public Hero(HeroFactory factory)
 {
     weapon   = factory.CreateWeapon();
     movement = factory.CreateMovement();
 }