diff options
author | metamuffin <metamuffin@disroot.org> | 2024-06-04 20:48:43 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-06-04 20:48:43 +0200 |
commit | 4ebe819106d82459def54561cf8dc71ec22ba6e4 (patch) | |
tree | 991046e078bf9de21cc392343401ef1d46a8962c /src/lib.rs | |
parent | e49a85505701740b195a03892e1fc5cf8d6382a2 (diff) | |
download | gpn-tron-rust-4ebe819106d82459def54561cf8dc71ec22ba6e4.tar gpn-tron-rust-4ebe819106d82459def54561cf8dc71ec22ba6e4.tar.bz2 gpn-tron-rust-4ebe819106d82459def54561cf8dc71ec22ba6e4.tar.zst |
save creds
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, } |