diff --git a/README.md b/README.md index a16b504..71e72c7 100644 --- a/README.md +++ b/README.md @@ -1 +1,7 @@ -# pokevault \ No newline at end of file +# 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 \ No newline at end of file diff --git a/main/saves/yellow_surfing_test.sav b/main/saves/yellow_surfing_test.sav new file mode 100644 index 0000000..cad2c11 Binary files /dev/null and b/main/saves/yellow_surfing_test.sav differ diff --git a/main/src/saves.rs b/main/src/saves.rs new file mode 100644 index 0000000..fd2fe77 --- /dev/null +++ b/main/src/saves.rs @@ -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 +} \ No newline at end of file diff --git a/main/src/test.rs b/main/src/test.rs new file mode 100644 index 0000000..da7ae4d --- /dev/null +++ b/main/src/test.rs @@ -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); + } + +} \ No newline at end of file