You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.7 KiB
70 lines
1.7 KiB
#![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!()
|
|
// }
|
|
// }
|
|
|