squirrel-battle/dungeonbattle/display/display.py

21 lines
614 B
Python
Raw Normal View History

2020-11-06 14:34:24 +00:00
import curses
from .mapdisplay import MapDisplay
2020-11-06 16:43:30 +00:00
from .texturepack import TexturePack
2020-11-06 14:34:24 +00:00
class Display:
def __init__(self, game, screen):
self.screen = screen
self.game = game
2020-11-06 19:24:19 +00:00
self.map_display = MapDisplay(game.m,
TexturePack.get_pack(
2020-11-06 16:43:30 +00:00
game.settings.TEXTURE_PACK),
2020-11-06 19:24:19 +00:00
curses.LINES,
curses.COLS * 4 // 5)
2020-11-06 16:43:30 +00:00
2020-11-06 14:34:24 +00:00
def refresh(self):
2020-11-06 19:24:19 +00:00
self.map_display.update_pad()
def display(self, y, x):
self.map_display.display(y, x)