A text adventure dungeon crawler game written in Rust.
Worlds are defined with JSON. An example can be found on the . Deploying the world file in Rust looks like this:
```
use kingslayer::Cli;
fn main() { let cli = Cli::fromjsonfile("data/world.json");
cli.start();
}
or the loop can be managed manually like this:
use kingslayer::Cli;
fn main() { let cli = Cli::fromjsonfile("data/world.json");
println!("{}", cli.ask("l"));
loop {
match cli.ask(&cli.prompt()) {
s => {
println!("{}", s);
if s.contains("You died.") {
break;
}
}
}
}
} ```