import curses from typing import Any, Union from dungeonbattle.tests.screen import FakePad class Display: def __init__(self, screen: Any): self.screen = screen self.rows = curses.LINES if screen else 4 self.cols = curses.COLS * 4 // 5 if screen else 4 def refresh(self) -> None: raise NotImplementedError def newpad(self, height: int, width: int) -> Union[FakePad, Any]: if self.screen: return curses.newpad(height, width) else: return FakePad()