aboutsummaryrefslogtreecommitdiff
path: root/games/rstnode/rst-client/src/state/if_impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'games/rstnode/rst-client/src/state/if_impl.rs')
-rw-r--r--games/rstnode/rst-client/src/state/if_impl.rs70
1 files changed, 70 insertions, 0 deletions
diff --git a/games/rstnode/rst-client/src/state/if_impl.rs b/games/rstnode/rst-client/src/state/if_impl.rs
new file mode 100644
index 000000000000..38bac369d3cc
--- /dev/null
+++ b/games/rstnode/rst-client/src/state/if_impl.rs
@@ -0,0 +1,70 @@
+#![allow(unused)]
+
+use super::ClientState;
+use async_trait::async_trait;
+use chrono::{DateTime, Utc};
+use rst_core::{
+ wire::{
+ game::Action, AuthErr, Lobby, LobbyErr, LobbyId, LobbyUpdate, MatchErr, MatchId, RegErr,
+ UpdateState, User, UserId,
+ },
+ GameIf, Match,
+};
+use std::sync::Arc;
+
+#[async_trait]
+impl GameIf for ClientState {
+ async fn register(self: Arc<Self>, name: String, pw: String) -> Result<UserId, RegErr> {
+ todo!()
+ }
+
+ async fn login(self: Arc<Self>, name: String, pw: String) -> Result<User, AuthErr> {
+ todo!()
+ }
+
+ async fn logout(self: Arc<Self>, user: User) -> Result<(), AuthErr> {
+ todo!()
+ }
+
+ async fn anonymous(self: Arc<Self>, name: String) -> Result<User, AuthErr> {
+ todo!()
+ }
+
+ async fn join(self: Arc<Self>, user: User, lobby: LobbyId) -> Result<Lobby, LobbyErr> {
+ todo!()
+ }
+
+ async fn leave(self: Arc<Self>, user: User, lobby: LobbyId) -> Result<(), LobbyErr> {
+ todo!()
+ }
+
+ async fn ready(
+ self: Arc<Self>,
+ user: User,
+ lobby: LobbyId,
+ ready: bool,
+ ) -> Result<LobbyUpdate, LobbyErr> {
+ todo!()
+ }
+
+ async fn start_req(
+ self: Arc<Self>,
+ user: UserId,
+ lobby: LobbyId,
+ ) -> Result<DateTime<Utc>, LobbyErr> {
+ todo!()
+ }
+
+ async fn perform_action(
+ self: Arc<Self>,
+ user: User,
+ mtch: MatchId,
+ act: Action,
+ ) -> UpdateState {
+ todo!()
+ }
+
+ async fn leave_match(self: Arc<Self>, user: User, mtch: MatchId) -> Result<(), MatchErr> {
+ todo!()
+ }
+}