Exemple #1
0
 public CommandInterpreter(IRepository repository, IBehaviourFactory behaviourFactory,
                           IAttackFactory attackFactory)
 {
     this.repository       = repository;
     this.behaviourFactory = behaviourFactory;
     this.attackFactory    = attackFactory;
 }
Exemple #2
0
 public Controller(IDatabase database, IBlobFactory blobFactory, IAttackFactory attackFactory, IBehaviourFactory behaviourFactory)
 {
     this.BehaviourFactory = behaviourFactory;
     this.AttackFactory    = attackFactory;
     this.BlobFactory      = blobFactory;
     this.Database         = database;
 }
Exemple #3
0
 public Engine(IUserInterface userInterface, IAttackFactory attackFactory, IBlobFactory blobFactory, IBehaviorFactory behaviorFactory, IDatabase database)
 {
     this.userInterface   = userInterface;
     this.attackFactory   = attackFactory;
     this.blobFactory     = blobFactory;
     this.behaviorFactory = behaviorFactory;
     this.database        = database;
 }
Exemple #4
0
        public IUnit CreateBlob(string name, int heatlh, int damage,
                                string behaviorType, string attackType,
                                IBehaviorFactory behavior, IAttackFactory attack)
        {
            var blob = new Blob(name, heatlh, damage, behaviorType, attackType, behavior, attack);

            return(blob);
        }
Exemple #5
0
 public Engine(IUserInterface userInterface, IAttackFactory attackFactory, IBlobFactory blobFactory, IBehaviorFactory behaviorFactory, IDatabase database)
 {
     this.userInterface = userInterface;
     this.attackFactory = attackFactory;
     this.blobFactory = blobFactory;
     this.behaviorFactory = behaviorFactory;
     this.database = database;
 }
 public BlobEngine(IBlobFactory blobFactory, IAttackFactory attackFactory, IBehaviorFactory behaviorFactory,
     IData data, IInputReader reader, IOutputWriter writer)
 {
     this.blobFactory = blobFactory;
     this.attackFactory = attackFactory;
     this.behaviorFactory = behaviorFactory;
     this.data = data;
     this.reader = reader;
     this.writer = writer;
 }
Exemple #7
0
 public Engine(IRenderer renderer, IInputController inputController,  ICommandFactory commandFactory, IBlobFactory blobFactory, IAttackFactory attackFactory, IBehaviorFactory behaviorFactory)
 {
     this.renderer = renderer;
     this.inputController = inputController;
     this.CommandFactory = commandFactory;
     this.blobs = new List<IBlob>();
     this.BlobFactory = blobFactory;
     this.AttackFactory = attackFactory;
     this.BehaviorFactory = behaviorFactory;
 }
Exemple #8
0
 public Engine(IBlockFactory blobFactory, IAttackFactory attackFactory,
     IBehaviorFactory behaviorFactory, IReader reader, IWriter writer, IData data)
 {
     this.blobFactory = blobFactory;
     this.attackFactory = attackFactory;
     this.behaviorFactory = behaviorFactory;
     this.reader = reader;
     this.writer = writer;
     this.data = data;
 }
Exemple #9
0
        public Engine(IBlobFactory blobFactory, IAttackFactory attackFactory, IBehaviorFactory behaviorFactory,
                      IInputReader reader, IOutputWriter writer, IBlobData blobData)
        {
            this.blobFactory     = blobFactory;
            this.attackFactory   = attackFactory;
            this.behaviorFactory = behaviorFactory;
            this.reader          = reader;
            this.writer          = writer;
            this.blobData        = blobData;

            this.shouldReportEvents = false;
        }
        public Engine(IBlobFactory blobFactory, IAttackFactory attackFactory, IBehaviorFactory behaviorFactory,
            IInputReader reader, IOutputWriter writer, IBlobData blobData)
        {
            this.blobFactory = blobFactory;
            this.attackFactory = attackFactory;
            this.behaviorFactory = behaviorFactory;
            this.reader = reader;
            this.writer = writer;
            this.blobData = blobData;

            this.shouldReportEvents = false;
        }
Exemple #11
0
 public Engine(
     IBlobFactory blobFactory,
     IAttackFactory attackFactory,
     IBehaviorFactory behaviorFactory,
     IInputReader reader,
     IOutputWriter outputWriter)
 {
     this.BlobFactory = blobFactory;
     this.AttackFactory = attackFactory;
     this.BehaviorFactory = behaviorFactory;
     this.InputReader = reader;
     this.OutputWriter = outputWriter;
 }
Exemple #12
0
        public IBlob CreateBlob(
            string name,
            int health,
            int damage,
            string attackType,
            string behaviourType,
            IAttackFactory attackFactory,
            IBehaviorFactory behaviorFactory)
        {
            var blob = new Blob(name, damage, health, attackType, behaviourType, attackFactory, behaviorFactory);

            return blob;
        }
    public IBlob CreateBlob(
        string name,
        int health,
        int damage,
        string attackType,
        string behaviourType,
        IAttackFactory attackFactory,
        IBehaviorFactory behaviorFactory)
    {
        IBlob blob = new Blob(name, damage, health, attackType, behaviourType, attackFactory, behaviorFactory);

        return(blob);
    }
Exemple #14
0
 public Engine(
     IBlobFactory blobFactory,
     IAttackFactory attackFactory,
     IBehaviorFactory behaviorFactory,
     IInputReader reader,
     IOutputWriter outputWriter)
 {
     this.BlobFactory     = blobFactory;
     this.AttackFactory   = attackFactory;
     this.BehaviorFactory = behaviorFactory;
     this.InputReader     = reader;
     this.OutputWriter    = outputWriter;
 }
 public BlobsEngine(IBlobFactory blobFactory,
     IAttackFactory attackFactory,
     IBehaviorFactory behaviorFactory,
     IBlobsData blobsData,
     IInputReader inputReader,
     IOutputWriter outputWriter)
 {
     this.blobFactory = blobFactory;
     this.attackFactory = attackFactory;
     this.behaviorFactory = behaviorFactory;
     this.blobsData = blobsData;
     this.inputReader = inputReader;
     this.outputWriter = outputWriter;
 }
 public Engine(
     IReader reader,
     IWriter writer,
     IBlobFactory blobFactory,
     IBehaviorFactory behaviorFactory,
     IAttackFactory attackFactory)
 {
     this.reader          = reader;
     this.Writer          = writer;
     this.blobFactory     = blobFactory;
     this.behaviorFactory = behaviorFactory;
     this.attackFactory   = attackFactory;
     this.blobs           = new Dictionary <string, IUnit>();
 }
 public Blob(string name, int health, int damage,
             string behaviorType, string attackType,
             IBehaviorFactory behaviorFactory, IAttackFactory attackFactory)
 {
     this.Name                = name;
     this.Health              = health;
     this.Damage              = damage;
     this.BehaviorType        = behaviorType;
     this.AttackType          = attackType;
     this.behaviorFactory     = behaviorFactory;
     this.attackFactory       = attackFactory;
     this.initialHealth       = health;
     this.isBehaviorActivated = false;
     this.IsBahaviuorIsDone   = false;
     this.isMoreThanOneUpdate = false;
 }
Exemple #18
0
 public Engine(
     IRenderer renderer,
     IInputController inputController,
     ICommandFactory commandFactory,
     IFieldOfPLay fieldOfPLay,
     IAttackFactory attackFactory,
     IBehaviourFactory behaviourFactory)
 {
     this.renderer = renderer;
     this.inputController = inputController;
     this.CommandFactory = commandFactory;
     this.FieldOfPLay = fieldOfPLay;
     AttackFactory = attackFactory;
     BehaviourFactory = behaviourFactory;
     this.ReportEvents = false;
 }
Exemple #19
0
 public Blob(
     string name,
     int damage,
     int health,
     string attackType,
     string behaviorType,
     IAttackFactory attackFactory,
     IBehaviorFactory behaviorFactory)
 {
     this.Name = name;
     this.Damage = damage;
     this.Health = health;
     this.initialHealth = health;
     this.AttackType = attackType;
     this.BehaviorType = behaviorType + BehaviorSuffix;
     this.AttackFactory = attackFactory;
     this.BehaviorFactory = behaviorFactory;
 }
Exemple #20
0
 public Blob(
     string name,
     int damage,
     int health,
     string attackType,
     string behaviorType,
     IAttackFactory attackFactory,
     IBehaviorFactory behaviorFactory)
 {
     this.Name            = name;
     this.Damage          = damage;
     this.Health          = health;
     this.initialHealth   = health;
     this.AttackType      = attackType;
     this.BehaviorType    = behaviorType + BehaviorSuffix;
     this.AttackFactory   = attackFactory;
     this.BehaviorFactory = behaviorFactory;
 }
Exemple #21
0
 public Engine(
     IInputReader reader,
     IOutputWriter writer,
     ICommandDispatcher commandDispatcher,
     IGroupFactory groupFactory,
     IWarEffectFactory warEffectFactory,
     IAttackFactory attackFactory,
     IDatabase db)
 {
     this.writer                   = writer;
     this.reader                   = reader;
     this.commandDispatcher        = commandDispatcher;
     this.commandDispatcher.Engine = this;
     this.GroupFactory             = groupFactory;
     this.WarEffectFactory         = warEffectFactory;
     this.AttackFactory            = attackFactory;
     this.Db = db;
 }
Exemple #22
0
        public Blob(string name, int health, int damage, 
            IAttackFactory attackFactory, IBehaviorFactory behaviorFactory, 
            string attackType, string behaviorType)
        {
            this.Name = name;
            this.Health = health;
            this.Damage = damage;

            this.attackFactory = attackFactory;
            this.behaviorFactory = behaviorFactory;

            this.attack = this.attackFactory.DefineAttack(attackType);
            this.behavior = this.behaviorFactory.DefineBehavior(behaviorType);

            this.initialHealth = health;
            this.initialDamage = damage;

            this.hasTriggeredBehavior = false;
            this.concecutiveBehaviorDeley = DeffaultConcecutiveBehaviorDeley;
        }
Exemple #23
0
 public Attack GetNextAttack(IAttackFactory attacks) => attacks.GetAttack(GetRandomFromZero(attacks.Count));
Exemple #24
0
 public Boss(IAttackSequence attackSequence)
 {
     _attackSequence = attackSequence ?? throw new ArgumentNullException(nameof(attackSequence));
     _attackFactory  = new AttackFactory();
 }
 public Engine(IInputReader reader, IOutputWriter writer, IBlobFactory blobFactory, IBehaviourFactory behaviourFactory, IAttackFactory attackFactory, ICombatHandler combataHandler)
 {
     this.Reader           = reader;
     this.Writer           = writer;
     this.BlobFactory      = blobFactory;
     this.BehaviourFactory = behaviourFactory;
     this.AttackFactory    = attackFactory;
     this.CombatHandler    = combataHandler;
     this.CommandExecutor  = new CommandExecutor(this);
 }
Exemple #26
0
 public Engine(IRenderer renderer, IInputController inputController, ICommandFactory commandFactory, IBlobFactory blobFactory, IAttackFactory attackFactory, IBehaviorFactory behaviorFactory)
 {
     this.renderer        = renderer;
     this.inputController = inputController;
     this.CommandFactory  = commandFactory;
     this.blobs           = new List <IBlob>();
     this.BlobFactory     = blobFactory;
     this.AttackFactory   = attackFactory;
     this.BehaviorFactory = behaviorFactory;
 }
Exemple #27
0
 public Attack GetNextAttack(IAttackFactory attacks) => attacks.GetAttack(_currentAttackNumber++ % attacks.Count);
Exemple #28
0
 public GroupFactory(IWarEffectFactory warEffectFactory, IAttackFactory attackFactory)
 {
     this.WarEffectFactory = warEffectFactory;
     this.AttackFactory = attackFactory;
 }