aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2020-03-18 22:12:21 +0100
committerKatharina Fey <kookie@spacekookie.de>2020-03-18 22:12:21 +0100
commite458ac4c5293762f0afcfa8c2649995ce1b3ba09 (patch)
tree47c553e91a31da8014876bbfe4af1252869a9b67 /src/main.rs
parenteb86eb246e5a98867d0d8766a236d73b44bb46c7 (diff)
Making updates to the serialisability of data
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 1b6a5773d25d..647fec9b18b2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2,9 +2,35 @@
mod data;
mod gens;
+mod io;
mod map;
mod stats;
+mod wire;
-fn main() {
- println!("Hello, world!");
+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)
}