summaryrefslogtreecommitdiff
path: root/webhogg/game_server/src/group.rs
blob: 74a04f72a3a6e4ddd4c00b5832dbeb6528874045 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::server::{UserId, GameClient, GameServerError};

pub type GroupId = u32;

pub trait Group {
    fn id(&self) -> GroupId;
    fn group_type(&self) -> String;
    fn name(&self) -> String;

    fn run(&mut self);

    fn add_client(&mut self, id: UserId, client: GameClient) -> Result<(), GameServerError>;
}