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

[FEATURE] - [BattleList] - find position #1

Open
Kirattus opened this issue Jan 18, 2024 · 2 comments
Open

[FEATURE] - [BattleList] - find position #1

Kirattus opened this issue Jan 18, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Kirattus
Copy link

Is your feature request related to a problem? Please describe.
[BattleList] - We can't find battleList position sending a screenshot of all game window.

Describe the solution you'd like
Create a method who we can find the BattleList position on screen to calculate all things inside

Describe alternatives you've considered
not applicable

Additional context
To improve and maintain a clean code, the module should be intelligent to locate the position and calculate what is requested.

@Kirattus Kirattus added the enhancement New feature or request label Jan 18, 2024
@lucasmonstrox lucasmonstrox self-assigned this Jan 18, 2024
@lucasmonstrox
Copy link
Owner

I will create a base class TibiaClient to use singleton pattern like:

tibiapi = TibiaClient(image)
battleList = tibiapi.getBattleList()

It will return BattleList instance:

class BattleList:

If the image passed in the parameter doesn't find the BattleList, many methods will probably return None. Creating instance every frame is a bad idea.

@Kirattus
Copy link
Author

If the image passed in the parameter doesn't find the BattleList, many methods will probably return None. Creating instance every frame is a bad idea.

That's true.
by the way... the base class looks interesting

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

No branches or pull requests

2 participants