Removed unwanted code from mapdisplay.MapDisplay; the player should be drawn as a map entity, not on its own
This commit is contained in:
parent
c85166ff89
commit
9c8a352ecd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user