From c4958cc5c30c5c05972d7d12eb015cb07b2665c8 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Fri, 7 Aug 2015 01:11:52 +0200 Subject: colors \o/ --- test.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test.py b/test.py index b2c5168..d5fb740 100644 --- a/test.py +++ b/test.py @@ -98,7 +98,15 @@ while True: print(c.on_message()) for cell in c.world.cells.values(): - pygame.draw.circle(screen, (255,0,0), (int((cell.pos[0]-c.player.center[0])/2+400), int((cell.pos[1]-c.player.center[1])/2+300)), int(cell.size/2)) + if cell.is_virus: + color=(0,255,0) + elif cell.is_food: + color=(127,127,127) + elif cell.is_ejected_mass: + color=(255,255,255) + else: + color=(int(cell.color[0]*255), int(cell.color[1]*255), int(cell.color[2]*255)) + pygame.draw.circle(screen, color, (int((cell.pos[0]-c.player.center[0])/2+400), int((cell.pos[1]-c.player.center[1])/2+300)), int(cell.size/2)) print(list(c.player.own_cells)) -- cgit v1.2.3