More generic display update

This commit is contained in:
Yohann D'ANELLO
2020-12-18 15:07:09 +01:00
parent b8d32b29c8
commit 85870494a0
8 changed files with 46 additions and 18 deletions

View File

@ -4,6 +4,7 @@
import curses
from ..entities.player import Player
from ..game import Game
from ..translations import gettext as _
from .display import Display
@ -15,8 +16,8 @@ class StatsDisplay(Display):
super().__init__(*args, **kwargs)
self.pad = self.newpad(self.rows, self.cols)
def update_player(self, p: Player) -> None:
self.player = p
def update(self, game: Game) -> None:
self.player = game.player
def update_pad(self) -> None:
string2 = "Player -- LVL {}\nEXP {}/{}\nHP {}/{}"\