mohammadKarimi / Riter

Riter is not a pen, it's your mind.
MIT License
129 stars 6 forks source link

Refactor Shape Drawing into separate class. #124

Closed mohammadKarimi closed 1 week ago

mohammadKarimi commented 1 week ago

Is your feature request related to a problem? Please describe. Benefits of Refactoring Modular Code:

Each shape has its own implementation, making it easy to add new shapes. Readability and Testability:

The main control is simpler and easier to understand. Shape drawers are individually testable. Adherence to SOLID Principles:

Single Responsibility: Shape drawing is separated from the control. Open/Closed: Adding new shapes doesn’t require modifying existing code. Scalability:

New shapes can be added by simply implementing IShapeDrawer.