From 5cec841a52d4262f6425d4f29682ad89cea9003a Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Thu, 17 Mar 2022 14:32:07 -0400 Subject: [PATCH] cleanup files --- game/game_logic/src/lib.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/game/game_logic/src/lib.rs b/game/game_logic/src/lib.rs index 98708767..b1f9531b 100644 --- a/game/game_logic/src/lib.rs +++ b/game/game_logic/src/lib.rs @@ -10,8 +10,18 @@ pub async fn entrypoint() { // Load the game settings let mut settings = persistent::settings::PersistentGameSettings::load_or_create() .expect("Failed to parse game settings from disk. Possibly corrupt file?"); - + // Load the game save state let mut save_state = persistent::save_state::GameSaveState::load_or_create() .expect("Failed to parse game save state from disk. Possibly corrupt file?"); + + // TODO: Blocking game loop goes here + + // Clean up any resources + settings + .save() + .expect("Could not save game settings to disk."); + save_state + .save() + .expect("Could not save game save state to disk."); }