diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1,17 +1,21 @@ #![feature(async_closure)] #![feature(iterator_try_collect)] -use std::collections::HashMap; - use game::Game; +use redb::Database; +use std::collections::{HashMap, VecDeque}; use tokio::sync::{broadcast, RwLock}; + +pub mod bot; pub mod config; +pub mod database; pub mod game; pub mod spectate; -pub mod bot; pub struct State { pub tick: broadcast::Sender<bool>, // true for new game pub game: RwLock<Game>, pub players: RwLock<HashMap<u32, String>>, + pub win_history: RwLock<VecDeque<String>>, pub chat: broadcast::Sender<(String, String)>, + pub db: Database, } |