static void Main(string[] args) { var printer = new ConsolePrinter(); var canvas = new Canvas(printer); FillFigures(canvas); Console.WriteLine(); foreach (var value in canvas.arrayOfFigures) { printer.Print(value); } Console.ReadKey(); }
static void Main(string[] args) { var line = new Line(0, 0, 1, 1); var circle = new Circle(0, 0, 4); var round = new Round(4, 4, 2); var ring = new Ring(1, 1, 8, 3); var rectangle = new Rectangle(1, 1, 5, 7); List <Figure> figures = new List <Figure>(); figures.Add(line); figures.Add(circle); figures.Add(round); figures.Add(ring); figures.Add(rectangle); Canvas canvas = new Canvas(); ConsolePrinter printer = new ConsolePrinter(); canvas.DrawAll(printer, figures); Console.ReadKey(); }