Exemple #1
0
        private void TargetProcess()
        {
            if (Target.MoveTarget())
            {
                Target = new LinearMovingTarget(SensorsList[YCount - 1][XCount - 1].Coordinates.X, SensorsList[YCount - 1][XCount - 1].Coordinates.Y);
            }

            Target.SendSignal(Environment, SensorsList);
        }
Exemple #2
0
        public Model(int xCount, int yCount, int xSize, int ySize)
        {
            XCount = xCount;
            YCount = yCount;

            Pause = false;

            Environment = new Environment();

            SensorsList = new Sensor[yCount][];
            for (int i = 0; i < yCount; i++)
            {
                SensorsList[i] = new Sensor[xCount];
                for (int j = 0; j < xCount; j++)
                {
                    SensorsList[i][j] = new Sensor(new Point(j * xSize / xCount, i * ySize / yCount));
                }
            }

            Target = new LinearMovingTarget(xSize, ySize);

            TargetCell     = null;
            TargetPosition = Point.Empty;
        }