aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
blob: a213a83708ab70c0d4f6b27ce6955e50ee4dc0d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![feature(async_closure)]
#![feature(iterator_try_collect)]
use std::collections::HashMap;

use game::Game;
use tokio::sync::{broadcast, RwLock};
pub mod config;
pub mod game;
pub mod spectate;

pub struct State {
    pub tick: broadcast::Sender<bool>, // true for new game
    pub game: RwLock<Game>,
    pub players: RwLock<HashMap<u32, String>>,
    pub chat: broadcast::Sender<(String, String)>,
}