diff options
author | metamuffin <metamuffin@disroot.org> | 2024-06-20 02:16:41 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-06-23 19:21:49 +0200 |
commit | c78665e4fd83a64a67a6747ec9429c74a3d4a466 (patch) | |
tree | 6d0714808ca3c3fb9a3ca652770668058f5f89cc /server/src/lib.rs | |
parent | 935dc832d02ba49ad50cbbaee333ab2dacd3226d (diff) | |
download | hurrycurry-c78665e4fd83a64a67a6747ec9429c74a3d4a466.tar hurrycurry-c78665e4fd83a64a67a6747ec9429c74a3d4a466.tar.bz2 hurrycurry-c78665e4fd83a64a67a6747ec9429c74a3d4a466.tar.zst |
generate dot graph from recipes
Diffstat (limited to 'server/src/lib.rs')
-rw-r--r-- | server/src/lib.rs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/server/src/lib.rs b/server/src/lib.rs index a326190d..2f677d7c 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -1,5 +1,16 @@ -pub mod game; -pub mod protocol; +use data::{build_gamedata, Gamedata}; +use std::fs::File; + +pub mod customer; pub mod data; +pub mod game; pub mod interaction; -pub mod customer; +pub mod protocol; + +pub fn load_gamedata() -> Gamedata { + build_gamedata( + serde_yaml::from_reader(File::open("data/recipes.yaml").unwrap()).unwrap(), + serde_yaml::from_reader(File::open("data/map.yaml").unwrap()).unwrap(), + serde_yaml::from_reader(File::open("data/demands.yaml").unwrap()).unwrap(), + ) +} |