Display main menu by default

This commit is contained in:
Yohann D'ANELLO
2020-11-08 22:59:11 +01:00
parent 933385e79d
commit 8ccf8c7b67
4 changed files with 27 additions and 33 deletions

View File

@ -1,25 +1,15 @@
import curses
from typing import Any
from .mapdisplay import MapDisplay
from .texturepack import TexturePack
class Display:
# game is a game, can't import to avoid circulary includes
def __init__(self, game: Any, screen: Any):
def __init__(self, screen: Any):
self.screen = screen
self.game = game
lines = curses.LINES if screen else 4
cols = curses.COLS * 4 // 5 if screen else 4
self.map_display = MapDisplay(game.m,
TexturePack.get_pack(
game.settings.TEXTURE_PACK
),
lines, cols, screen is not None)
self.rows = curses.LINES if screen else 4
self.cols = curses.COLS * 4 // 5 if screen else 4
def refresh(self) -> None:
self.map_display.update_pad()
raise NotImplementedError
def display(self, y: int, x: int) -> None:
self.map_display.display(y, x)
raise NotImplementedError