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/main.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/main.rs')
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 74d784b..fb0f0d2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,7 @@ use gpn_tron2::{ bot::spawn_bots, config::Config, + database::open_db, game::{server::game_server, Game}, spectate::server::spectate_server, State, @@ -13,9 +14,11 @@ async fn main() -> anyhow::Result<()> { env_logger::init_from_env("LOG"); let config = Config::load()?; let state = Arc::new(State { + db: open_db(config.database)?, tick: broadcast::channel(512).0, game: Game::new(vec![]).into(), players: Default::default(), + win_history: Default::default(), chat: broadcast::channel(512).0, }); spawn(spectate_server(config.spectate, state.clone())); |