Removed unwanted code from mapdisplay.MapDisplay; the player should be drawn as a map entity, not on its own

This commit is contained in:
Charles Peyrat 2020-10-23 17:46:44 +02:00
parent c85166ff89
commit 9c8a352ecd
1 changed files with 1 additions and 3 deletions

View File

@ -4,16 +4,14 @@ from dungeonbattle.interfaces import Map
class MapDisplay:
def __init__(self, m: Map, player):
def __init__(self, m: Map):
self.map = m
self.pad = curses.newpad(m.height, m.width+1)
self.player = player
def update_pad(self):
self.pad.addstr(0, 0, self.map.draw_string())
for e in self.map.entities:
self.pad.addch(e.y, e.x, e.img)
self.pad.addstr(self.player.getPosY(), self.player.getPosX(), '🐿')
def display(self, y, x):
deltay, deltax = (curses.LINES // 2) + 1, (curses.COLS //2) + 1