private void DrawFigure(IDrawableFigure drawableFigure) { if (drawableFigure == null) { return; } Console.WriteLine($"Figure: {drawableFigure.GetType().Name} Color: {drawableFigure.Color} X:{drawableFigure.X} Y:{drawableFigure.Y}"); Console.WriteLine(); }
private void DrawFigure(IDrawableFigure drawableFigure) { if (drawableFigure == null) { return; } var currentColor = Console.ForegroundColor; Console.ForegroundColor = drawableFigure.Color; Console.WriteLine("Figure: " + drawableFigure.GetType().Name); Console.WriteLine("Color: " + drawableFigure.Color); Console.WriteLine("X: " + drawableFigure.CoordinateX); Console.WriteLine("Y: " + drawableFigure.CoordinateY); Console.WriteLine(); Console.ForegroundColor = currentColor; }