comparison pytouhou/vm/eclrunner.py @ 158:7769ce7be03c

Minor cleanup
author Thibaut Girka <thib@sitedethib.com>
date Mon, 10 Oct 2011 18:56:13 +0200
parents ca6f8b3f739d
children 4684d311a32d
comparison
equal deleted inserted replaced
157:ca6f8b3f739d 158:7769ce7be03c
460 minx, miny, maxx, maxy = (0., 0., 0., 0.) 460 minx, miny, maxx, maxy = (0., 0., 0., 0.)
461 461
462 angle = self._game.prng.rand_double() * (max_angle - min_angle) + min_angle 462 angle = self._game.prng.rand_double() * (max_angle - min_angle) + min_angle
463 sa, ca = sin(angle), cos(angle) 463 sa, ca = sin(angle), cos(angle)
464 464
465 distx = min(96.0, (maxx - minx) / 2.)
466 disty = min(96.0, (maxy - miny) / 2.)
467
468 if self._enemy.x > maxx - 96.0: 465 if self._enemy.x > maxx - 96.0:
469 ca = -abs(ca) 466 ca = -abs(ca)
470 elif self._enemy.x < minx + 96.0: 467 elif self._enemy.x < minx + 96.0:
471 ca = abs(ca) 468 ca = abs(ca)
472 469