summaryrefslogtreecommitdiff
path: root/game_server/src/group.rs
diff options
context:
space:
mode:
authornatrixaeria <janng@gmx.de>2019-05-19 22:38:25 +0200
committernatrixaeria <janng@gmx.de>2019-05-19 22:38:25 +0200
commit054a2bfe069ed4118d2f9fd1f01428632049057b (patch)
treeba017b1597e3f140d260ef0f6a3218591136c600 /game_server/src/group.rs
parent2d815af3f6d062d55da2f2598ce5d506ee74cb6e (diff)
Add a client handling system
Diffstat (limited to 'game_server/src/group.rs')
-rw-r--r--game_server/src/group.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/game_server/src/group.rs b/game_server/src/group.rs
index 55e4fbf..6356a14 100644
--- a/game_server/src/group.rs
+++ b/game_server/src/group.rs
@@ -1,8 +1,14 @@
+use super::server::{UserId, GameClient};
+
pub type GroupId = u32;
pub trait Group {
fn id(&self) -> GroupId;
+ fn group_type(&self) -> String;
fn name(&self) -> String;
- fn run(&self);
+ fn run(&mut self);
+
+ fn add_client(&mut self, id: UserId, client: GameClient);
+ fn get_client(&self, client_id: UserId) -> Option<&GameClient>;
}