22 lines
310 B
Rust
22 lines
310 B
Rust
use cultivar_common::prelude::*;
|
|
|
|
use dashmap::DashMap;
|
|
|
|
pub struct Sims {
|
|
pub sims: DashMap<SimId, Sim>,
|
|
}
|
|
|
|
impl Sims {
|
|
pub fn new() -> Self {
|
|
Self {
|
|
sims: DashMap::new(),
|
|
}
|
|
}
|
|
|
|
pub fn new_sim(&self, sim: Sim) -> SimId {
|
|
let sim_id = SimId([0; 16]);
|
|
self.sims.insert(sim_id, sim);
|
|
sim_id
|
|
}
|
|
}
|