aboutsummaryrefslogtreecommitdiff
path: root/src/map.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.rs')
-rw-r--r--src/map.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/map.rs b/src/map.rs
new file mode 100644
index 000000000000..31bc9a3dbe38
--- /dev/null
+++ b/src/map.rs
@@ -0,0 +1,19 @@
+//! Implements a map graph and world logic
+
+use crate::data::{Node, Link};
+use std::collections::BTreeMap;
+use async_std::sync::Arc;
+
+
+/// A map that people fight on
+///
+/// A map is defined by it's graph relationships, but also where on
+/// the map nodes are placed, how much spacing there is, etc. All
+/// this information is encoded in the same structs because it's
+/// static, and just more convenient.
+pub struct Map {
+ /// Node IDs mapped to node objects
+ nodes: BTreeMap<u16, Arc<Node>>,
+ /// Link IDs mapped to link objects
+ links: BTreeMap<u16, Arc<Link>>,
+}