cleanup files

This commit is contained in:
Evan Pratten 2022-03-17 14:32:07 -04:00
parent 24ee5894b9
commit 5cec841a52

View File

@ -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.");
}