public static SpaceTemplate Generate(SpaceTemplateGeneratorProperties properties) { Random random = new Random(properties.Seed); bool[,] obstacles = GenerateObstacles(random, properties.Width, properties.Height, properties.NumberOfObstacles, properties.ObstacleMinSize, properties.ObstacleMaxSize); bool[,] agents = GenerateAgents(random, obstacles, properties.NumberOfAgents); return(new SpaceTemplate(obstacles, agents)); }
public static bool[,] GenerateObstacles(SpaceTemplateGeneratorProperties properties) { return(GenerateObstacles( new Random(properties.Seed), properties.Width, properties.Height, properties.NumberOfObstacles, properties.ObstacleMinSize, properties.ObstacleMaxSize )); }
public static bool[,] GenerateAgents(SpaceTemplateGeneratorProperties properties, bool[,] obstaclesMap) { return(GenerateAgents(new Random(properties.Seed), obstaclesMap, properties.NumberOfAgents)); }
public static void GenerateAgents(SpaceTemplateGeneratorProperties properties, SpaceTemplate environmentBitmap) { GenerateAgents(new Random(properties.Seed), environmentBitmap.Obstacles, environmentBitmap.AgentMap, properties.NumberOfAgents); environmentBitmap.Update(); }