rust-gamemap (gamemap) - v0.1.0
A small 2D Map library for console games in Rust.
How to use
Create a map 20x20
let mut m = new;
Update the map (print on the console)
m.update;
Add some text above and below the map
let mut utext = String from;
let mut ltext = String from;
m.set_uppertext
.set_lowertext
.update;
Add some sprites to the map (1 Player, 2 Enemies)
let mut sprites = vec!;
m.add_sprite
.add_sprite
.add_sprite
.update;
Move a sprite on the map
m.move_sprite
.update;
Remove sprites (Enemies)
m.remove_sprite
.remove_sprite
.update;
Clear the map
m.clear
.update;
Installation
Add this line to your Cargo.toml:
[]
= "0.1.0"
and then add this line to your main.rs:
extern crate gamemap;