summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2015-08-11 18:02:45 +0200
committerFlorian Jung <flo@windfisch.org>2015-08-11 18:02:45 +0200
commitc1fd7cb5e809ce22b10c8bf9e0b0700edf2aebf9 (patch)
treed39763411089338fc58aeae76db2061abf3a31c0
parent9d20eb42565cf95574a1806d956c8e164ab2d570 (diff)
clear_screen() function
-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()))