Clear screen before redrawing

This commit is contained in:
Yohann D'ANELLO 2020-10-23 15:40:32 +02:00
parent d264bb45cf
commit 8437482139
1 changed files with 2 additions and 2 deletions

View File

@ -19,10 +19,10 @@ class Game:
player.y = 1 player.y = 1
player.x = 6 player.x = 6
d = MapDisplay(m, player) d = MapDisplay(m, player)
screen.refresh()
while True: while True:
d.display(player.getPosY(), player.getPosX()) screen.clear()
screen.refresh() screen.refresh()
d.display(player.getPosY(), player.getPosX())
key = screen.getkey() key = screen.getkey()
self.handle_key_pressed(key) self.handle_key_pressed(key)