blob: 31bc9a3dbe3815b7e86248c109faf4fe970a0875 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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>>,
}
|