summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpitfireX <timm.weber@me.com>2015-08-10 00:01:00 +0200
committerSpitfireX <timm.weber@me.com>2015-08-10 00:01:00 +0200
commit847357fdefe3925f67824c5ec2f5a8d3c191843e (patch)
tree6351e64ce4eb3c1886c07eb02f30722c7d6c3b23
parent9830c309d355d083218375c16bf311071741f3fb (diff)
Some cleanup regarding cell rendering
-rw-r--r--test.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/test.py b/test.py
index ad290ac..8605de8 100644
--- a/test.py
+++ b/test.py
@@ -158,12 +158,12 @@ def drawCell(cell):
else:
color=(int(cell.color[0]*255), int(cell.color[1]*255), int(cell.color[2]*255))
- gfxdraw.aacircle(screen, cx, cy, radius, color)
- gfxdraw.filled_circle(screen, cx, cy, radius, color)
-
if not (cell.is_ejected_mass or cell.is_food):
- gfxdraw.aacircle(screen, cx, cy, int(radius/2.5), (255,255,255))
- gfxdraw.circle(screen, cx, cy, int(radius/2.5), (255,255,255))
+ gfxdraw.filled_circle(screen, cx, cy, radius, color)
+ gfxdraw.aacircle(screen, cx, cy, radius, (0,0,0))
+
+ gfxdraw.aacircle(screen, cx, cy, int(radius/2), (255,255,255))
+ gfxdraw.circle(screen, cx, cy, int(radius/2), (255,255,255))
font_size = 16
@@ -172,7 +172,9 @@ def drawCell(cell):
surface = drawText(str(int(cell.mass)), (255, 255, 255), font_size)
screen.blit(surface, (cx - (surface.get_width()/2), cy - (surface.get_height()/2)))
-
+ else:
+ gfxdraw.aacircle(screen, cx, cy, radius, color)
+ gfxdraw.filled_circle(screen, cx, cy, radius, color)
def draw_leaderboard():
def filter(item): return item[1]
leaderboard = list(map(filter, c.world.leaderboard_names))