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

Improvements to step walker #4097

Merged
merged 1 commit into from
Aug 19, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pokemongo_bot/walkers/step_walker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from math import sqrt

from random import random, uniform
from random import uniform
from pokemongo_bot.cell_workers.utils import distance
from pokemongo_bot.human_behaviour import random_lat_long_delta, sleep

Expand Down Expand Up @@ -28,7 +28,7 @@ def __init__(self, bot, dest_lat, dest_lng):
self.totalDist = max(1, self.dist)

if self.speed == 0:
self.steps = 1
raise Exception("Walking speed cannot be 0, change your walking speed higher than 1!")
else:
self.steps = (self.dist + 0.0) / (self.speed + 0.0)

Expand Down