summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2015-08-07 01:11:52 +0200
committerFlorian Jung <flo@windfisch.org>2015-08-07 01:11:52 +0200
commitc4958cc5c30c5c05972d7d12eb015cb07b2665c8 (patch)
tree467f119e3eb8cef58d6711a0e2703f79df1ef58e /test.py
parent7e816d4202e5d90e7ec1dadb4e95b3a1030665b1 (diff)
colors \o/
Diffstat (limited to 'test.py')
-rw-r--r--test.py10
1 files changed, 9 insertions, 1 deletions
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))