From: Eric S. Raymond Date: Fri, 13 Oct 2006 02:46:16 +0000 (+0000) Subject: Another step in subsuming navigation into the course object. X-Git-Tag: 2.0~73 X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=commitdiff_plain;h=7245e2990261e1a8d19cfcba2c140b82a954cb73 Another step in subsuming navigation into the course object. --- diff --git a/src/sst.py b/src/sst.py index 33149f3..6056bb2 100644 --- a/src/sst.py +++ b/src/sst.py @@ -3619,9 +3619,9 @@ def imove(course=None, novapush=False): game.quad[game.sector.i][game.sector.j] = IHDOT x = game.sector.i y = game.sector.j - n = int(10.0*course.distance*bigger+0.5) + n = course.moves if n > 0: - for m in range(1, n+1): + for m in range(n): x += deltax y += deltay w.i = int(round(x)) @@ -3941,7 +3941,7 @@ class course: self.increment = coord(-math.sin(self.angle), math.cos(self.angle)) bigger = max(abs(self.increment.i), abs(self.increment.j)) self.increment /= bigger - self.moves = 10*self.distance*bigger +0.5 + self.moves = int(round(10*self.distance*bigger)) def next(self, grain=1): "Next step on course." self.moves -=1