blob: dd1fe1c6347ebf11b383cf5f32782da612f45114 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
//! Implements a map graph and world logic
use crate::data::{Link, Node};
use async_std::sync::Arc;
use serde::{Deserialize, Serialize};
use std::collections::BTreeMap;
/// 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.
#[derive(Serialize, Deserialize)]
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>>,
}
impl Map {}
|