Skip to content

Zaechus/kingslayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👑 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).