summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2015-08-11 13:58:07 +0200
committerFlorian Jung <flo@windfisch.org>2015-08-11 13:58:07 +0200
commit38bf13ffb7412335dc127aeab693fe6b85c64063 (patch)
tree044be7395d21c09df435236ccff93f57539751cb
parent804cf4d8145a53722739b4cad8dbbacdf0bf166c (diff)
fixed wall avoidance at top and bottom
OAR math, OAR.
-rw-r--r--main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.py b/main.py
index 5026269..65072a7 100644
--- a/main.py
+++ b/main.py
@@ -67,9 +67,9 @@ while True:
if c.player.center[0] > c.world.bottom_right[1]-c.player.total_size:
forbidden_intervals += [(0,0.5*pi), (1.5*pi, 2*pi)]
if c.player.center[1] < c.world.top_left[0]+c.player.total_size:
- forbidden_intervals += [(0, pi)]
- if c.player.center[1] > c.world.bottom_right[0]-c.player.total_size:
forbidden_intervals += [(pi, 2*pi)]
+ if c.player.center[1] > c.world.bottom_right[0]-c.player.total_size:
+ forbidden_intervals += [(0, pi)]
if (runaway):
forbidden_intervals = merge_intervals(forbidden_intervals)