Skip to content

Refactor architecture to follow object-oriented class structure #85

@harryswift01

Description

@harryswift01

Restructure the codebase to adopt a consistent and maintainable object-oriented architecture. This involves encapsulating related functionality into cohesive classes, improving separation of concerns, and organizing the system around clear responsibilities.

  • Identify procedural or loosely grouped functions and organize them into appropriate classes.
  • Define core classes (e.g. LevelManager, EntropyManager, RunManager) with clear ownership of responsibilities.
  • Introduce private attributes and encapsulate internal state (_attribute pattern).
  • Use @property decorators to expose only necessary parts of the internal state.
  • Replace global/shared variables with instance attributes where appropriate.
  • Ensure each class has a single, clear purpose (Single Responsibility Principle).
  • Refactor duplicate or ambiguous function names for clarity and alignment with class behavior.
  • Ensure reusable logic (e.g. matrix generation, entropy calculations) is encapsulated in class methods rather than procedural scripts.
  • Remove or refactor legacy code that violates OOP principles.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions