Corrigé la merde de Charles

This commit is contained in:
Nicolas Margulies 2020-11-06 14:23:12 +01:00
parent 37c9fd5267
commit bbbcb1b10e
1 changed files with 4 additions and 3 deletions

View File

@ -8,11 +8,12 @@ class Game:
def init(self) -> None:
Game.INSTANCE = self
self.key_handler = player_move
self.key_handler = self.player_move
def new_game(self):
# TODO generate a new map procedurally
m = Map.load("example_map.txt")
self.m = Map.load("example_map.txt")
self.d = MapDisplay(self.m)
self.player = Player()
self.player.y = 1
self.player.x = 6
@ -26,7 +27,7 @@ class Game:
while True:
screen.clear()
screen.refresh()
d.display(player.getPosY(), player.getPosX())
self.d.display(self.player.getPosY(), self.player.getPosX())
key = screen.getkey()
self.key_handler(key)