have to debug from_utf8 stuff. :/

This commit is contained in:
2022-07-04 12:06:41 +02:00
parent 2d073eb8e8
commit 4be5a72972
4 changed files with 34 additions and 1 deletions

View File

@@ -1 +1,7 @@
# pokevault
# pokevault
## save files
### yellow
for pokemon yellow, this legend has created a bunch of save files and documented his journey doing so. Got it from him:
https://www.youtube.com/watch?v=hdUopla7T1E

Binary file not shown.

4
main/src/saves.rs Normal file
View File

@@ -0,0 +1,4 @@
pub struct Save {
pub(crate) trainer_name: String,
pub(crate) playtime_hours: u8 //in seconds, biggest number should be like 4.3 mill, biggest available time (999:95) is like... 3.6 mill, maybe a little more. 3.7 max
}

23
main/src/test.rs Normal file
View File

@@ -0,0 +1,23 @@
#[cfg(test)]
mod test {
use std::env;
use std::path::Path;
use crate::{read_save, Save};
#[test]
fn basic_test() {
assert!(true)
}
#[test]
fn test_name() {
let path = env::current_dir().unwrap();
println!("The current dir: {}", path.display());
println!("testing the savegames name");
let s: Save = read_save(Path::new("saves/yellow_surfing_test.sav")).unwrap();
println!("{}", s.trainer_name);
assert!(true);
}
}