summaryrefslogtreecommitdiff
path: root/strategy.py
diff options
context:
space:
mode:
Diffstat (limited to 'strategy.py')
-rw-r--r--strategy.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/strategy.py b/strategy.py
index 961a4e1..a1937e2 100644
--- a/strategy.py
+++ b/strategy.py
@@ -25,8 +25,8 @@ class Strategy:
if (not cell.is_virus and dist < 500+2*cell.size and cell.mass > 1.25 * my_smallest) or (cell.is_virus and dist < my_largest and cell.mass < my_largest):
angle = math.atan2(relpos[1],relpos[0])
- corridor_width = 2 * math.asin(cell.size / dist)
- forbidden_intervals += canonicalize_angle_interval((angle-corridor_width, angle+corridor_width))
+ corridor_halfwidth = math.asin(cell.size / dist)
+ forbidden_intervals += canonicalize_angle_interval((angle-corridor_halfwidth, angle+corridor_halfwidth))
runaway = True
# wall avoidance