summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2015-08-26 22:51:28 +0200
committerFlorian Jung <flo@windfisch.org>2015-08-26 22:51:28 +0200
commitada18916c2ad68f7f2ac2d69ca51ac2e9a8b2df4 (patch)
tree8f5c668d7fc857759662b4192cbb4e72f0c23f6a
parentbe59b002fb2650bf17f58420fa93b0f8bef74a25 (diff)
draw cell.parent
-rw-r--r--gui.py13
-rw-r--r--main.py1
2 files changed, 14 insertions, 0 deletions
diff --git a/gui.py b/gui.py
index 895b1ac..ed5c9d3 100644
--- a/gui.py
+++ b/gui.py
@@ -273,6 +273,19 @@ def draw_markers():
for i in [0, 1, 2]:
draw_marker(marker[i], colors[i], marker_updated[i])
+def draw_debug():
+ for cell in c.world.cells.values():
+ parent = None
+ try:
+ parent = cell.parent
+ except AttributeError:
+ pass
+
+ if parent != None:
+ draw_line(cell.pos, parent.pos,(255,0,0))
+ draw_circle(parent.pos,3,(255,0,0),True)
+
+
def draw_frame():
global screen, movement, zoom, screensize, input, bot_input, marker, marker_updated, running
diff --git a/main.py b/main.py
index c0e9a21..d07b6b8 100644
--- a/main.py
+++ b/main.py
@@ -71,6 +71,7 @@ while gui.running:
stats.process_frame()
+ gui.draw_debug()
gui.update()
if not c.player.is_alive: