First commit
This commit is contained in:
commit
b05ccbaa7e
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/target
|
1785
Cargo.lock
generated
Normal file
1785
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
9
Cargo.toml
Normal file
9
Cargo.toml
Normal 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
22
src/main.rs
Normal 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)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user