kingslayer 0.1.0

A text adventure dungeon crawler game written in Rust
Documentation

Kingslayer

Build Status

A text adventure dungeon crawler game written in Rust.

Creating and Running a World

Worlds are defined with JSON. An example can be found on the wiki. Deploying the world file in Rust looks like this:

use kingslayer::get_world;

fn main() {
    let cli = kingslayer::get_world("data/world.json");

    println!("{}", cli.ask("l"));
    loop {
        match cli.ask(&cli.prompt()) {
            s => {
                println!("{}", s);
                if s.contains("You died.") {
                    break;
                }
            }
        }
    }
}