diff options
Diffstat (limited to 'games/rstnode/src/_if.rs')
-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) |