Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ослина Анастасия #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

malinaboky
Copy link

private readonly List<Rectangle> rectangles = [];
private readonly Point center = new();

public CircularCloudLayouter(ICloudDistribution distribution)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Давай также сделаем возможность указывать позицию центра

var rnd = new Random();
for (var i = 0; i < rectanglesCount; i++)
{
var rectangleSize = new Size(rnd.Next(5, 30), rnd.Next(5, 30));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не плохо бы добавить, чтобы можно было управлять размерами прямоугольников



[TestFixture]
public class CircularCloudLayouterTest

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests)

}

[Test]
public void CircularCloudLayouter_Initialize()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Из названия не понятно, что должно быть после инициализации

public Size GetCloudSize()
{
if (rectangles.Count == 0)
throw new ArgumentException("Cloud cannot be empty.");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мы выбрасываем ArgumentException хотя не передаем никаких аргументов. Может стоит немного поменять логику, например возвращать Size(0, 0)

}
}

public void SaveToPath(string fileName, string imagesPath)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно вынести в отдельный класс, что придерживаться Single Responsibility Principle. Рендерер как будто не про сохранение картинок

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants