public Grid(int xMax, int yMax, IObstacleGenerator generatorOfObstaclesPoint) { this.xMax = xMax; this.yMax = yMax; this.obstacles = generatorOfObstaclesPoint.ObstacleGen(this.xMax, this.Ymax); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("Grid dimensions are: Xmax " + this.xMax.ToString() + " Ymax " + this.yMax.ToString()); Console.ForegroundColor = ConsoleColor.DarkRed; Console.WriteLine("Obstacles are:"); foreach (Obstacle obstacle in obstacles) { Console.WriteLine("X: " + obstacle.X.ToString() + " Y: " + obstacle.Y.ToString()); } Console.ResetColor(); }
public void GenerateObstacleCoordinates(int numberOfObstacles, IObstacleGenerator obstacleCoordGenerator) { Obstacles = obstacleCoordGenerator.Generate(Coordinates, numberOfObstacles); }