Corrigé la merde de Charles
This commit is contained in:
parent
37c9fd5267
commit
bbbcb1b10e
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user