refactor: Improve project Structure
This commit is contained in:
22
src/omnia/main.py
Normal file
22
src/omnia/main.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from pathlib import Path
|
||||
|
||||
from omnia.game_loop import start_game
|
||||
from omnia.logging_setup import configure_logging
|
||||
from omnia.scenario_loader import load_scenario, save_scenario
|
||||
|
||||
# Find demo.json in project root (go up from src/omnia to root)
|
||||
SCENARIO_PATH = Path(__file__).parent.parent.parent / "demo.json"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
configure_logging()
|
||||
scenario = load_scenario(SCENARIO_PATH)
|
||||
start_game(
|
||||
scenario.entities,
|
||||
scenario.player_id,
|
||||
world_time=scenario.metadata.get("world_time"),
|
||||
location=scenario.metadata.get("location", "Unknown"),
|
||||
world_state=scenario.world_state,
|
||||
spatial_graph=scenario.spatial_graph,
|
||||
)
|
||||
save_scenario(SCENARIO_PATH, scenario)
|
||||
Reference in New Issue
Block a user