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

Quality: use dependency injection for supplying the AI_Interface to each module #18

Open
StijnDeJong opened this issue Jul 30, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@StijnDeJong
Copy link
Collaborator

At the moment the Module abstract class creates an AI_Interface on initialization. With three different module, three AI_Interface instances will be created. This is unnecessary as there are no special configurations per module for the AI_Interface; they should all use the same instance. Instead this instance should be initialized before creating all module instances and pass it as a parameter when creating those module instances. This will not only reduce the memory usage (no three instances of the same class) as well as all other benefits dependency injection provides.

@StijnDeJong StijnDeJong added enhancement New feature or request good first issue Good for newcomers labels Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant