Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.29 KB

README.md

File metadata and controls

42 lines (32 loc) · 1.29 KB

👑 Kingslayer ⚔️

CI Crates.io Kingslayer documentation

Kingslayer is a text-based adventure game and library written in Rust.

Playing the game

You can play online here: zaechus.github.io/kingslayer-web

or install Kingslayer:

cargo install kingslayer
kingslayer

or clone the project and run it:

git clone https://github.com/Zaechus/kingslayer
cd kingslayer
cargo run --release

Making a game

You can make a world like world.ron and run it directly with kingslayer:

kingslayer custom_world.ron

or in a separate program with the kingslayer library:

use kingslayer::*;

fn main() {
    let mut game: Game = include_str!("world.ron").parse().unwrap();

    game.play().unwrap();
}

Alternatively, you can manually handle input and output with the ask method (kingslayer-web example).