diff options
author | Florian Jung <flo@windfisch.org> | 2015-08-07 01:11:52 +0200 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2015-08-07 01:11:52 +0200 |
commit | c4958cc5c30c5c05972d7d12eb015cb07b2665c8 (patch) | |
tree | 467f119e3eb8cef58d6711a0e2703f79df1ef58e /test.py | |
parent | 7e816d4202e5d90e7ec1dadb4e95b3a1030665b1 (diff) |
colors \o/
Diffstat (limited to 'test.py')
-rw-r--r-- | test.py | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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)) |