Ejemplo n.º 1
0
        public World(ContentManager content, Rectangle bounds, int width, int height)
        {
            LoadContent(content);

            Bounds = bounds;
            Shapes = new BasicShapes();
            Fps    = new FrameCounter();

            Creatures = new List <Creature>();

            for (int i = 0; i < CreatureCount; ++i)
            {
                Creatures.Add(new Creature(bounds, TxCreature, Color.White));
            }

            Food      = new List <Food>();
            Obstacles = new List <Obstacle>();

            AddFood(0);
            AddObstacles(0);

            Camera      = new Camera(new Viewport(0, 0, width, height), width + width / 4, height);
            GA          = new GeneticAlgorithm(75, 1);
            GraphValues = new double[30000];
            DoDrawScene = true;
            DoDrawGraph = true;
        }
Ejemplo n.º 2
0
        public World(ContentManager content, Rectangle bounds, int width, int height)
        {
            LoadContent(content);

            Bounds = bounds;
            Shapes = new BasicShapes();
            Fps = new FrameCounter();

            Creatures = new List<Creature>();

            for (int i = 0; i < CreatureCount; ++i) {
                Creatures.Add(new Creature(bounds, TxCreature, Color.White));
            }

            Food = new List<Food>();
            Obstacles = new List<Obstacle>();

            AddFood(0);
            AddObstacles(0);

            Camera = new Camera(new Viewport(0, 0, width, height), width + width / 4, height);
            GA = new GeneticAlgorithm(75, 1);
            GraphValues = new double[30000];
            DoDrawScene = true;
            DoDrawGraph = true;
        }