Esempio n. 1
0
 public Bot(IOutput output, MonsterFactory monsterFactory,
            HealerFactory healerFactory,
            WeaponDealerFactory weaponDealerFactory,
            ClothesDealerFactory clothesDealerFactory, PersonageSettings settings) : base(output)
 {
     _monsterFactory       = monsterFactory;
     _healerFactory        = healerFactory;
     _weaponDealerFactory  = weaponDealerFactory;
     _clothesDealerFactory = clothesDealerFactory;
     _settings             = settings;
 }
Esempio n. 2
0
 public Game(MonsterFactory monsterFactory,
             HealerFactory healerFactory,
             WeaponDealerFactory weaponDealerFactory,
             ClothesDealerFactory clothesDealerFactory,
             BotFactory botFactory,
             Gamer gamer)
 {
     _gamer   = gamer;
     _actions = new Dictionary <ConsoleKey, Func <Personage> >
     {
         { ConsoleKey.W, monsterFactory.GetPersonage },
         { ConsoleKey.S, healerFactory.GetPersonage },
         { ConsoleKey.A, weaponDealerFactory.GetPersonage },
         { ConsoleKey.D, clothesDealerFactory.GetPersonage },
         { ConsoleKey.E, botFactory.GetPersonage }
     };
 }