Linting
This commit is contained in:
@ -1,21 +1,18 @@
|
||||
#!/usr/bin/env python
|
||||
from typing import Any
|
||||
import curses
|
||||
|
||||
from dungeonbattle.display.texturepack import TexturePack
|
||||
from dungeonbattle.entities.player import Player
|
||||
from dungeonbattle.interfaces import Map
|
||||
from .display import Display
|
||||
|
||||
|
||||
class MapDisplay(Display):
|
||||
player: Player
|
||||
|
||||
|
||||
def __init__(self, *args):
|
||||
super().__init__(*args)
|
||||
|
||||
def update_map(self, m: Map):
|
||||
def update_map(self, m: Map) -> None:
|
||||
self.map = m
|
||||
self.pad = curses.newpad(m.height, m.width + 1)
|
||||
self.pad = self.newpad(m.height, m.width + 1)
|
||||
|
||||
def update_pad(self) -> None:
|
||||
self.pad.addstr(0, 0, self.map.draw_string(self.pack))
|
||||
@ -36,4 +33,4 @@ class MapDisplay(Display):
|
||||
pmincol = max(0, min(self.map.width, pmincol))
|
||||
self.pad.clear()
|
||||
self.update_pad()
|
||||
self.pad.refresh(pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol)
|
||||
self.pad.refresh(pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol)
|
||||
|
Reference in New Issue
Block a user