border-wars/crates/server/src save/game.rs
Tipragot 27e0aad29d
Some checks are pending
Rust Checks / checks (push) Waiting to run
Avancement relatif
2024-04-12 04:36:23 +02:00

26 lines
411 B
Rust

use dashmap::DashMap;
use lazy_static::lazy_static;
use server::SlotDashMap;
use slotmap::SlotMap;
use uuid::Uuid;
server::new_key_type! {
struct GameId;
}
lazy_static! {
static ref GAMES: SlotDashMap<GameId, Game> = SlotDashMap::new();
}
slotmap::new_key_type! {
struct PlayerId;
}
pub struct Game {
players: SlotMap<PlayerId, Player>,
}
pub struct Player {
connection_secret: Uuid,
}