summaryrefslogtreecommitdiff
path: root/gui.py
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2015-08-24 18:06:59 +0200
committerFlorian Jung <flo@windfisch.org>2015-08-24 18:06:59 +0200
commitc2e13a67d969f1208a8b8c127c94a9841c7048d9 (patch)
tree9a44f247aa8e66b7ce71dae63ebe9c8a84c5babc /gui.py
parent58b0b9da0241ff8623581b2cb837eaf34b8f165d (diff)
cell motion history
Diffstat (limited to 'gui.py')
-rw-r--r--gui.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/gui.py b/gui.py
index 19fffbb..440e0ef 100644
--- a/gui.py
+++ b/gui.py
@@ -142,6 +142,11 @@ def generate_virus(spikes, spike_length, radius, global_coords):
def draw_cell(cell):
cx,cy = world_to_win_pt(cell.pos,c.player.center)
+ try:
+ cx2,cy2 = world_to_win_pt(cell.poslog[-2],c.player.center)
+ except:
+ print("wtf, no poslog available?!")
+ cx2,cy2=cx,cy
radius = world_to_win_length(cell.size)
if cell.is_virus:
@@ -158,6 +163,8 @@ def draw_cell(cell):
gfxdraw.aapolygon(screen, polygon2, color)
else:
color=(int(cell.color[0]*255), int(cell.color[1]*255), int(cell.color[2]*255))
+
+ gfxdraw.filled_circle(screen, cx2, cy2, radius, (127,127,127))
if not (cell.is_ejected_mass or cell.is_food):
gfxdraw.filled_circle(screen, cx, cy, radius, color)