61 lines
1.3 KiB
Python
61 lines
1.3 KiB
Python
from .menu import Action, action_menu
|
|
|
|
|
|
class ConsoleUi:
|
|
|
|
def __init__(self):
|
|
pass
|
|
|
|
@staticmethod
|
|
def empty_room():
|
|
print("\n ------ Pièce vide ------ \n")
|
|
|
|
@staticmethod
|
|
def meet_mob(mob):
|
|
print(f"Un {mob.name} est devant toi !")
|
|
|
|
@staticmethod
|
|
def player_dead():
|
|
print("!!!!!!!!! Joueur mort !!!!!!!!!!")
|
|
|
|
@staticmethod
|
|
def mob_dead(mob):
|
|
print(f"Le {mob.name} est mort !!")
|
|
|
|
@staticmethod
|
|
def run_away():
|
|
print("Tu fuis la pièce")
|
|
|
|
@staticmethod
|
|
def leave(player):
|
|
print(f"Au revoir {player.name} !")
|
|
|
|
@staticmethod
|
|
def select_player(player):
|
|
print(player)
|
|
|
|
@staticmethod
|
|
def entering_room(room_name):
|
|
print(f"Pièce actuelle : {room_name}")
|
|
|
|
@staticmethod
|
|
def last_room():
|
|
print("fin du donjon !")
|
|
|
|
@staticmethod
|
|
def entering_donjon(level):
|
|
print(f"Nombre de pièce dans le donjon : {len(level.rooms)}")
|
|
|
|
@staticmethod
|
|
def action_menu(actions_autorisees: list[Action] = None) -> Action:
|
|
return action_menu(actions_autorisees)
|
|
|
|
@staticmethod
|
|
def fight_pvs(player, mob, pvs):
|
|
for pv in pvs:
|
|
print(f"{player.name} - {pv['player']} PV")
|
|
print(f"{mob.name} - {pv['mob']} PV")
|
|
|
|
|
|
UI = ConsoleUi()
|