private static void Main(string[] args)
        {
            IInputReader inputReader = new ConsoleReader();
            IOutputWriter outputWriter = new ConsoleWriter();

            IBlobsData blobsData = new BlobsData();

            IBlobFactory blobFactory = new BlobFactory();
            IAttackFactory attackFactory = new AttackFactory();
            IBehaviorFactory behaviorFactory = new BehaviorFactory();

            IEngine engine = new BlobsEngine(blobFactory,attackFactory,behaviorFactory,blobsData,inputReader,outputWriter);
            engine.Run();
        }
Exemple #2
0
        static void Main()
        {
            IInputController inputController = new ConsoleInputController();
            IRenderer renderer = new ConsoleRenderer();

            ICommandFactory commandFactory = new CommandFactory();
            IBlobFactory blobFactory = new BlobFactory();
            IAttackFactory attackFactory = new AttackFactory();
            IBehaviorFactory behaviorFactory = new BehaviorFactory();

            IEngine engine = new Engine(renderer, inputController, commandFactory, blobFactory, attackFactory,
                behaviorFactory);

            engine.Run();
        }
Exemple #3
0
        public static IBlob Create(string name, int health, int damage, BehaviorTypes behavior, AttackTypes attack)
        {
            int blobHealth = health;

            int attackDamage = new int();

            if (attack == AttackTypes.PutridFart)
            {
                attackDamage = damage;
            }
            else if (attack == AttackTypes.Blobplode)
            {
                attackDamage = 2 * damage;
            }

            IAttack blobAttack = AttackFactory.Create(attackDamage, attack);

            IBehavior blobBehavior = BehaviorFactory.Create(behavior);

            return(new Blob(name, blobHealth, damage, blobAttack, blobBehavior));
        }