Esempio n. 1
0
 public Engine()
 {
     this.manager    = new WeaponManager();
     this.gemFactory = new GemFactory();
     this.reader     = new InputReader();
     this.writer     = new OutputWriter();
 }
Esempio n. 2
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();
        }
Esempio n. 3
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();
        }
Esempio n. 4
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();
        }
Esempio n. 5
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();
        }
Esempio n. 6
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();
        }