Пример #1
0
        static void Main(string[] args)
        {
            List <IWeapon> weapons       = new List <IWeapon>();
            WeaponFactory  weaponFactory = new WeaponFactory();
            GemFactory     gemFactory    = new GemFactory();
            Engine         engine        = new Engine(weapons, weaponFactory, gemFactory);

            engine.Run();
        }
Пример #2
0
        public static void Main(string[] args)
        {
            IWeaponRepository   weaponRepository = new WeaponRepository();
            IWeaponFactory      weaponFactory    = new WeaponFactory();
            IGemFactory         gemFactory       = new GemFactory();
            ICommandInterpreter interpreter      = new CommandInterpreter(weaponRepository, weaponFactory, gemFactory);

            Engine engine = new Engine(interpreter);

            engine.Run();
        }
Пример #3
0
        public static void Main(string[] args)
        {
            var repository    = new WeaponRepository();
            var interpreter   = new CommandInterpreter();
            var weaponFactory = new WeaponFactory();
            var gemFactory    = new GemFactory();

            IRunnable engine = new Engine(gemFactory, weaponFactory, interpreter, repository);

            engine.Run();
        }
Пример #4
0
        public static void Main(string[] args)
        {
            IRarityFactory        rarityFactory    = new RarityFactory();
            IWeaponFactory        weaponFactory    = new WeaponFactory();
            IClarityFactory       clarityFactory   = new ClarityFactory();
            IGemFactory           gemFactory       = new GemFactory();
            IRepository <IWeapon> weaponRepository = new WeaponRepository();
            IReader reader = new ConsoleReader();
            IWriter writer = new ConsoleWriter();

            ICommandInterpreter commandInterpreter = new CommandInterpreter(weaponRepository, weaponFactory, rarityFactory, gemFactory, clarityFactory, writer);

            IRunnable engine = new Engine(commandInterpreter, reader);

            engine.Run();
        }
Пример #5
0
        static void Main()
        {
            IConsoleInputController inputController = new ConsoleInputController();
            IConsoleRender          renderer        = new ConsoleRender();

            ICommandFactory commandFactory = new CommandFactory();
            IWeaponFactory  weaponFactory  = new WeaponFactory();
            IGemFactory     gemFactory     = new GemFactory();

            IInventory inventory = new Inventory();

            IEngine engine = new Engine.Engine(
                renderer,
                inputController,
                commandFactory,
                weaponFactory,
                gemFactory,
                inventory
                );

            engine.Run();
        }
Пример #6
0
 public WeaponManager()
 {
     this.weapons       = new List <IWeapon>();
     this.weaponFactory = new WeaponFactory();
 }