Пример #1
0
        public Space(int width, int height, AgentsCollisionModel agentsCollisionModel)
        {
            Width  = width;
            Height = height;
            fields = new SpaceField <TAgent> [width, height];
            AgentsCollisionModel = agentsCollisionModel;

            for (int y = 0; y < height; y++)
            {
                for (int x = 0; x < width; x++)
                {
                    fields[x, y] = new SpaceField <TAgent>(this, x, y, AgentsCollisionModel == AgentsCollisionModel.Ghost);
                }
            }
        }