Пример #1
0
        public void SetParams(int index, int countRate, int mass, int maxMass, int massDelta,
                              int massDeltaPlus, int massToDevide, bool allowMove, decimal feedRate,
                              int poison, int poisonDelta, int poisonResitrance, int sleep,
                              int consumentOrder, Point position, ICore core, IEnv enviroment)
        {
            OrganismIndex = index;

            CountRate = countRate;

            Mass          = mass;
            MaxMass       = maxMass;
            MassDelta     = massDelta;
            MassDeltaPlus = massDeltaPlus;
            MassToDevide  = massToDevide;

            AllowMove = allowMove;

            FeedRate = feedRate;

            PoisonLevel      = poison;
            PoisonDelta      = poisonDelta;
            PoisonResistence = poisonResitrance;

            SleepCicles = sleep;

            ConsumentOrder = consumentOrder;

            Position = position;

            Enviroment = enviroment;
            Core       = core.Create();
        }
Пример #2
0
        public virtual void Init(IEnv enviroment, ICore core, Point position, int index)
        {
            Enviroment    = enviroment;
            Core          = core.Create(core);
            Position      = position;
            OrganismIndex = index;

            Config();
        }