⚡️ character loading once
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
import sys
|
||||
from enum import Enum
|
||||
|
||||
from character_builder import CharacterBuilder
|
||||
@@ -45,10 +46,12 @@ def action_menu(actions_autorisees: list[Action] = None) -> Action:
|
||||
# Exemple d'utilisation
|
||||
if __name__ == "__main__":
|
||||
loaded_character = CharacterBuilder.load_character("Jamin")
|
||||
if loaded_character:
|
||||
if not loaded_character:
|
||||
sys.exit(-1)
|
||||
|
||||
print(loaded_character)
|
||||
|
||||
level = Level(2, CharacterBuilder.load_character("Jamin"))
|
||||
level = Level(2, loaded_character)
|
||||
player = level.player
|
||||
rooms = level.rooms
|
||||
number_room = len(rooms)
|
||||
|
||||
Reference in New Issue
Block a user