Clear screen before redrawing

This commit is contained in:
Yohann D'ANELLO 2020-10-23 15:40:32 +02:00
parent d264bb45cf
commit 8437482139

View File

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