roguelike-game/src/main.rs

22 lines
409 B
Rust
Raw Normal View History

2021-10-20 12:01:15 -04:00
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)
}