Example #1
0
        public FinalCell(TissueCell parentCell)
            : base(parentCell)
        {
            initializeFinalCell();
            //if (parentCell.GetType() == typeof(BlastCell))
            //{
            //    this.generation = 1;
            //    if (SimulationCore.DEBUG)
            //    {
            //        if (parentCell.CellBehaviors.GetType() == typeof(GOBehaviorAggregate))
            //            throw new NotImplementedException("have not implemented GO behaviors yet");
            //    }

            //    //cellBehaviors = new SimpleBehaviorAggregate(SimulationCore.Instance.SimulationParams.FinalCellConfig);
            //}

            cellBehaviors = new SimpleBehaviorAggregate((SimpleBehaviorAggregate)parentCell.CellBehaviors);
            if (parentCell.GetType() == typeof(FinalCell))
                this.generation = ((FinalCell)parentCell).generation + 1;

            //cellBehaviors = new SimpleBehaviorAggregate((SimpleBehaviorAggregate)parentCell.CellBehaviors);
            /*
            else if (parentCell.GetType() == typeof(FinalCell))
            {
                this.generation = ((FinalCell)parentCell).generation + 1;
                cellBehaviors = new SimpleBehaviorAggregate((SimpleBehaviorAggregate)parentCell.CellBehaviors);
            }
             * */
        }
Example #2
0
        public FinalCell(Vector3 position, SimulationParameters.SimpleBehaviorParam behaviorConfig, int startingFood)
            : base(position, startingFood)
        {
            cellBehaviors = new SimpleBehaviorAggregate(behaviorConfig);

            this.generation = 1;
            initializeFinalCell();
            checkChildProbabilities(this);
        }
Example #3
0
        public BlastCell(Vector3 position, SimulationParameters.SimpleBehaviorParam behaviorConfig, int startingFood)
            : base(position, startingFood)
        {
            cellBehaviors = new SimpleBehaviorAggregate(behaviorConfig);

            Console.WriteLine("creating first blast cell at: " + position);

            initializeBlastCell();
            checkChildProbabilities(this);
        }
Example #4
0
 public BlastCell(TissueCell parentCell)
     : base(parentCell)
 {
     cellBehaviors = new SimpleBehaviorAggregate((SimpleBehaviorAggregate)parentCell.CellBehaviors);
     initializeBlastCell();
 }
        // copy constructor
        public SimpleBehaviorAggregate(SimpleBehaviorAggregate old)
        {
            this.divideBehavior = new SimpleDivide(old.divideBehavior);
            this.deathBehavior = new SimpleDeathBehavior(old.deathBehavior);

            this.pressureToleranceAtLocation = new SimplePressureToleranceAtLocation(old.pressureToleranceAtLocation);
            this.pressureToleranceAtNeighbors = new SimplePressureToleranceAtNeighbors(old.pressureToleranceAtNeighbors);

            this.foodConsumptionBehavior = new SimpleFoodConsumptionRate(old.foodConsumptionBehavior);
            this.foodMaxStorage = new SimpleFoodMaxStorage(old.foodMaxStorage);
            this.foodConcern = new SimpleFoodConcern(old.foodConcern);

            this.moveAbility = new SimpleMove(old.moveAbility);

            this.pipeEnter = new SimplePipeEnter(old.pipeEnter);
            this.pipeLeave = new SimplePipeLeave(old.pipeLeave);
            this.pipeSurvival = new SimplePipeSurvival(old.pipeSurvival);

            this.callPipeProbability = new SimpleCallPipe(old.callPipeProbability);
        }