rubenvereecken / pokemongo-api

Pokemon Go API for Python
Other
358 stars 120 forks source link

Trainer #29

Closed obiben closed 8 years ago

obiben commented 8 years ago

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 commented 8 years ago

@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 commented 8 years ago

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

dmadisetti commented 8 years ago

I like it. Will work out merge res problems

obiben commented 8 years ago

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 commented 8 years ago

@dmadisetti care to have another look at this one?

p0psicles commented 8 years ago

The cut average walking distance commit, really works well!

dmadisetti commented 8 years ago

see https://github.com/rubenvereecken/pokemongo-api/pull/86