summaryrefslogtreecommitdiff
path: root/gui.py
diff options
context:
space:
mode:
Diffstat (limited to 'gui.py')
-rw-r--r--gui.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/gui.py b/gui.py
index f09e9df..55000da 100644
--- a/gui.py
+++ b/gui.py
@@ -190,13 +190,19 @@ def set_client(cl):
global c
c=cl
+def clear_screen():
+ global screen
+ global c
+
+ screen.fill((255,255,255))
+
def draw_frame():
global screen, movement, zoom, screensize, input, bot_input
pygame.event.pump()
clock.tick()
-
- screen.fill((255,255,255))
+
+ clear_screen()
draw_world_borders()
food = list(filter(lambda x: x.is_food, c.world.cells.values()))