Skip to content

Commit

Permalink
improve step walker (#4097)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexyaoyang authored and mjmadsen committed Aug 19, 2016
1 parent c2aba68 commit cd841b0
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit cd841b0

Please sign in to comment.