aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
blob: e51b38750eadb650563137293bd6800cc1cf63ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#![allow(warnings)]

mod data;
mod gens;
mod io;
mod map;
mod stats;
mod wire;
mod server;

use ggez::{
    self, conf,
    event::{self, EventHandler},
    Context, ContextBuilder, GameResult,
};

struct GameState;

impl EventHandler for GameState {
    fn update(&mut self, _: &mut Context) -> GameResult {
        Ok(())
    }

    fn draw(&mut self, _: &mut Context) -> GameResult {
        Ok(())
    }
}

fn main() -> GameResult {
    let cb = ContextBuilder::new("RstNode", "Katharina Fey")
        .window_setup(conf::WindowSetup::default().title("RstNode").vsync(true))
        .window_mode(conf::WindowMode::default().dimensions(800.0, 600.0));

    let (ctx, el) = &mut cb.build()?;
    let mut game = GameState; // smash the state
    event::run(ctx, el, &mut game)
}