misc(refactor): move Server type to its own module

This commit is contained in:
2025-12-30 22:51:52 -05:00
Unverified
parent b416dc17ad
commit 23feed3f21
6 changed files with 846 additions and 876 deletions

View File

@@ -2,7 +2,7 @@ use std::net::SocketAddr;
use async_trait::async_trait;
use crate::*;
use crate::server::Server;
pub mod round_robin;
pub use round_robin::RoundRobin;
@@ -12,8 +12,8 @@ pub trait Tournament {
fn new(ready_players: &[SocketAddr]) -> Self
where
Self: Sized;
async fn next(&mut self, clients: &Clients, matches: &Matches, observers: &Observers);
async fn start(&mut self, clients: &Clients, matches: &Matches);
async fn cancel(&mut self, clients: &Clients, matches: &Matches, observers: &Observers);
async fn next(&mut self, server: &Server);
async fn start(&mut self, server: &Server);
async fn cancel(&mut self, server: &Server);
fn is_completed(&self) -> bool;
}