From 078afaad7b988e20bb3dc36a5b1821c08d8a6a99 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Tue, 11 Aug 2015 02:57:18 +0200 Subject: draw forbidden directions (debug output) --- gui.py | 2 +- main.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gui.py b/gui.py index 19690c8..ec4bcc3 100644 --- a/gui.py +++ b/gui.py @@ -242,4 +242,4 @@ def draw_frame(): if event.type == MOUSEMOTION: c.send_target(*win_to_world_pt(event.pos, c.player.center)) - pygame.display.update() \ No newline at end of file + pygame.display.update() diff --git a/main.py b/main.py index 477e122..7bc1d1e 100644 --- a/main.py +++ b/main.py @@ -69,6 +69,10 @@ while True: if (runaway): forbidden_intervals = merge_intervals(forbidden_intervals) + + for i in forbidden_intervals: + gui.draw_arc(c.player.center, c.player.total_size+10, i, (255,0,255)) + allowed_intervals = invert_angle_intervals(forbidden_intervals) (a,b) = find_largest_angle_interval(allowed_intervals) -- cgit v1.2.3