summaryrefslogtreecommitdiff
path: root/game_server/src/test_group.rs
diff options
context:
space:
mode:
authornatrixaeria <janng@gmx.de>2019-05-15 23:46:11 +0200
committernatrixaeria <janng@gmx.de>2019-05-15 23:46:11 +0200
commit2f9e5dfaac05538fdf4513569b4df6872ee85b89 (patch)
tree605a75fb41a09c892a8c8f3af16e984f38e06297 /game_server/src/test_group.rs
parent73eb78e3ac5eb7d382c1aca98da84cd866d54570 (diff)
Add web client functionality
additionally added -r feature to build.sh, which reverses build output.
Diffstat (limited to 'game_server/src/test_group.rs')
-rw-r--r--game_server/src/test_group.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/game_server/src/test_group.rs b/game_server/src/test_group.rs
new file mode 100644
index 0000000..bd570e3
--- /dev/null
+++ b/game_server/src/test_group.rs
@@ -0,0 +1,28 @@
+use super::group::{Group, GroupId};
+
+pub struct TestGroup {
+ id: GroupId,
+ name: String,
+}
+
+impl Group for TestGroup {
+ fn id(&self) -> GroupId {
+ self.id
+ }
+
+ fn name(&self) -> String {
+ self.name.clone()
+ }
+
+ fn run(&self) {
+ let id = self.id;
+ let name = self.name.to_owned();
+ std::thread::spawn(move || /*loop { println!("> group nr.{} wishes you: '{}'", id, name) }*/());
+ }
+}
+
+impl TestGroup {
+ pub fn new(id: GroupId, name: String) -> Self {
+ TestGroup { id, name }
+ }
+}