From c1fd7cb5e809ce22b10c8bf9e0b0700edf2aebf9 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Tue, 11 Aug 2015 18:02:45 +0200 Subject: clear_screen() function --- gui.py | 10 ++++++++-- 1 file 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())) -- cgit v1.2.3