summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index b5190bf..7b2809c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -32,17 +32,17 @@ fn main() {
let game_state = game_state_mutex.clone();
let graphics_thread = thread::spawn(move || {
- let mut window = graphics::start();
+ let mut graphics = graphics::Graphics::new();
- while window.is_open() {
+ while graphics.is_running() {
// aquire state resource
let game_state = match game_state.lock() {
Ok(game_state) => game_state,
Err(poisoned) => poisoned.into_inner(),
};
- graphics::render(&mut window, &game_state);
- graphics::update(&mut window);
+ graphics.render(&game_state);
+ graphics.update();
}
{