Soulless.GameClient (Soulless v0.3.0)

Copy Markdown View Source

Summary

Functions

child_spec(args)

fetch(client, payload)

See Soulless.Websocket.Client.fetch/2.

fetch(client, payload, timeout)

See Soulless.Websocket.Client.fetch/3.

game_info(client)

Current game players and rules

start(opts)

start_link(opts)

Generated

auth_game(client, payload, timeout \\ nil)

@spec auth_game(
  client :: pid(),
  payload :: Soulless.Game.Lq.ReqAuthGame.t(),
  timeout() | nil
) ::
  {:ok, Soulless.Game.Lq.ResAuthGame.t()} | {:error, term()}

auth_observe(client, payload, timeout \\ nil)

@spec auth_observe(
  client :: pid(),
  payload :: Soulless.Game.Lq.ReqAuthObserve.t(),
  timeout() | nil
) ::
  {:ok, Soulless.Game.Lq.ResCommon.t()} | {:error, term()}

broadcast_in_game(client, payload, timeout \\ nil)

@spec broadcast_in_game(
  client :: pid(),
  payload :: Soulless.Game.Lq.ReqBroadcastInGame.t(),
  timeout() | nil
) :: {:ok, Soulless.Game.Lq.ResCommon.t()} | {:error, term()}

check_network_delay(client, timeout \\ nil)

@spec check_network_delay(client :: pid(), timeout() | nil) ::
  {:ok, Soulless.Game.Lq.ResCommon.t()} | {:error, term()}

clear_leaving(client, timeout \\ nil)

@spec clear_leaving(client :: pid(), timeout() | nil) ::
  {:ok, Soulless.Game.Lq.ResCommon.t()} | {:error, term()}

confirm_new_round(client, timeout \\ nil)

@spec confirm_new_round(client :: pid(), timeout() | nil) ::
  {:ok, Soulless.Game.Lq.ResCommon.t()} | {:error, term()}

enter_game(client, timeout \\ nil)

@spec enter_game(client :: pid(), timeout() | nil) ::
  {:ok, Soulless.Game.Lq.ResEnterGame.t()} | {:error, term()}

fetch_game_player_state(client, timeout \\ nil)

@spec fetch_game_player_state(client :: pid(), timeout() | nil) ::
  {:ok, Soulless.Game.Lq.ResGamePlayerState.t()} | {:error, term()}

finish_sync_game(client, timeout \\ nil)

@spec finish_sync_game(client :: pid(), timeout() | nil) ::
  {:ok, Soulless.Game.Lq.ResCommon.t()} | {:error, term()}

input_chi_peng_gang(client, payload, timeout \\ nil)

@spec input_chi_peng_gang(
  client :: pid(),
  payload :: Soulless.Game.Lq.ReqChiPengGang.t(),
  timeout() | nil
) :: {:ok, Soulless.Game.Lq.ResCommon.t()} | {:error, term()}

input_game_gm_command(client, payload, timeout \\ nil)

@spec input_game_gm_command(
  client :: pid(),
  payload :: Soulless.Game.Lq.ReqGMCommandInGaming.t(),
  timeout() | nil
) :: {:ok, Soulless.Game.Lq.ResCommon.t()} | {:error, term()}

input_operation(client, payload, timeout \\ nil)

@spec input_operation(
  client :: pid(),
  payload :: Soulless.Game.Lq.ReqSelfOperation.t(),
  timeout() | nil
) :: {:ok, Soulless.Game.Lq.ResCommon.t()} | {:error, term()}

start_observe(client, timeout \\ nil)

@spec start_observe(client :: pid(), timeout() | nil) ::
  {:ok, Soulless.Game.Lq.ResStartObserve.t()} | {:error, term()}

stop_observe(client, timeout \\ nil)

@spec stop_observe(client :: pid(), timeout() | nil) ::
  {:ok, Soulless.Game.Lq.ResCommon.t()} | {:error, term()}

sync_game(client, payload, timeout \\ nil)

@spec sync_game(
  client :: pid(),
  payload :: Soulless.Game.Lq.ReqSyncGame.t(),
  timeout() | nil
) ::
  {:ok, Soulless.Game.Lq.ResSyncGame.t()} | {:error, term()}

terminate_game(client, timeout \\ nil)

@spec terminate_game(client :: pid(), timeout() | nil) ::
  {:ok, Soulless.Game.Lq.ResCommon.t()} | {:error, term()}

vote_game_end(client, payload, timeout \\ nil)

@spec vote_game_end(
  client :: pid(),
  payload :: Soulless.Game.Lq.ReqVoteGameEnd.t(),
  timeout() | nil
) ::
  {:ok, Soulless.Game.Lq.ResGameEndVote.t()} | {:error, term()}