nemu 0.1.0

An interactive story engine for creating text-based adventure games
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::{engine::game::Game, story::loader::load_story};
use std::path::PathBuf;

pub async fn handle_play(file: PathBuf) -> Result<(), Box<dyn std::error::Error>> {
    println!("Starting game: {:?}", file);
    
    let story = load_story(&file)?;
    let mut game = Game::new(story)?;
    
    game.run().await?;
    
    Ok(())
}