diff options
author | Katharina Fey <kookie@spacekookie.de> | 2021-01-29 11:16:03 +0100 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2021-01-29 11:27:30 +0100 |
commit | 398027b443cfb331fee64cf351036ca45502ae1b (patch) | |
tree | 0be40f365f6fbdf9ad7a01a10febff2f7c21f9e0 /games/rstnode/src/_if.rs | |
parent | 31ec889558d6a32d4861d7d14eff1f559e7ca72c (diff) |
rstnode: update dependencies and fixing game build
Diffstat (limited to '')
-rw-r--r-- | games/rstnode/src/_if.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/games/rstnode/src/_if.rs b/games/rstnode/src/_if.rs index 59d80fb165af..1a842840708c 100644 --- a/games/rstnode/src/_if.rs +++ b/games/rstnode/src/_if.rs @@ -8,7 +8,12 @@ use async_std::sync::Arc; use async_trait::async_trait; use chrono::{DateTime, Utc}; -/// The main game interface implemented by the server and client +/// Main game interface implemented by the server and client +/// +/// The client implementation simply translates requests to network +/// requests that are sent to the server. The server implementation +/// consists of two parts: the network layer listening loop, and the +/// game server state which then implements the actual game logic. #[async_trait] pub trait GameIf { /// Register a new user on a game server @@ -38,7 +43,11 @@ pub trait GameIf { ) -> Result<LobbyUpdate, LobbyErr>; /// Send a start request (as lobby admin) - async fn start_req(self: Arc<Self>, user: UserId, lobby: LobbyId) -> Result<DateTime<Utc>, LobbyErr>; + async fn start_req( + self: Arc<Self>, + user: UserId, + lobby: LobbyId, + ) -> Result<DateTime<Utc>, LobbyErr>; /// Perform a game action as a user async fn perform_action(self: Arc<Self>, user: User, mtch: MatchId, act: Action) |