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

Trainer #29

Closed
wants to merge 12 commits into from
Closed

Trainer #29

wants to merge 12 commits into from

Conversation

obiben
Copy link

@obiben obiben commented Jul 25, 2016

Hey,

Haven't fully tested this (there could be a "self" that I missed), but it seems like a good idea to wrap all those loose functions into some logical entity.

I had mindlessly copied demo.py to a bot file, but it made it so it couldn't benefit from the changes you made. Now my own bot (I'll PR it when it works, if you want it in) can inherit from Trainer and and sort forts its own way!

@obiben
Copy link
Author

obiben commented Jul 25, 2016

@dmadisetti by the way the bot in question is only doing sorting of forts different, but needs adjustments. I've made it use a quadtree to do some Z traversals, but I'm not quite sure how I could have it go "middle-out" rather than walking a kilometer to the first (and farthest) fort to start its run... after that the average distance is a little nicer than with the sort:
https://github.com/obiben/pokemongo-api/blob/obibot/pogo/obibot.py

@obiben
Copy link
Author

obiben commented Jul 25, 2016

@dmadisetti oh hell yeah, from an average of 415 meters to 155, all without my stupid quadtree!

@dmadisetti
Copy link
Collaborator

I like it. Will work out merge res problems

def findClosestFort(self):
# Find nearest fort (pokestop)
logging.info("Finding Nearest Fort:")
return self.sortCloseForts()[0]
Copy link

Choose a reason for hiding this comment

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

self.sortCloseForts() can be Null

…prehensible error. fixed another error when you have no balls of higher tier but had some at some point.
@obiben
Copy link
Author

obiben commented Jul 27, 2016

fixed it by throwing a better error.
also fixed error thrown when you used to have better balls but don't anymore
added a getpass() call because I don't like my password in my command history
added a rarity threshold to cleanPokemons call so it is less devastating releasing that sweet, sweet 12 cp snorlax

@rubenvereecken
Copy link
Owner

@dmadisetti care to have another look at this one?

@p0psicles
Copy link
Contributor

The cut average walking distance commit, really works well!

@dmadisetti
Copy link
Collaborator

see #86

@dmadisetti dmadisetti closed this Aug 11, 2016
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.

None yet

5 participants