1
0
Fork 0

First commit

This commit is contained in:
Timothy Warren 2021-10-20 12:01:15 -04:00
commit b05ccbaa7e
4 changed files with 1817 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target

1785
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

9
Cargo.toml Normal file
View File

@ -0,0 +1,9 @@
[package]
name = "roguelike_tutorial"
version = "0.1.0"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rltk = { version = "0.8.0" }

22
src/main.rs Normal file
View File

@ -0,0 +1,22 @@
use rltk::{Rltk, GameState};
struct State {}
impl GameState for State {
fn tick(&mut self, ctx: &mut Rltk) {
ctx.cls();
ctx.print(1, 1, "Hello Rust World");
}
}
fn main() -> rltk::BError {
use rltk::RltkBuilder;
let context = RltkBuilder::simple80x50()
.with_title("Roguelike Tutorial")
.build()?;
let gs = State {};
rltk::main_loop(context, gs)
}